Followed everything from this thread: https://www.virtualmin.com/node/39270 But still no luck, Apache 2 runs as www-data and gives me loads of troubles because of that.
Got some feedback from andreychek (https://www.virtualmin.com/node/41821) and he suggested to ask again in the forums, so here it is.
My machine is a Debian 8.5 fresh install, Virtualmin the latest and both php5 and php7 installed.
If you go into System Settings -> Re-Check Config, does it detect any PHP-related errors?
Apache is installed.
The following PHP versions are available : 5.6.24 (/usr/bin/php5-cgi), 7.0.10 (/usr/bin/php-cgi7.0)
Apache is configured to host SSL websites.
… your system is ready for use by Virtualmin.
find /etc/apache2/mods-enabled | xargs grep -i sethandler
find /etc/apache2/mods-enabled | xargs grep -i sethandler
grep: /etc/apache2/mods-enabled: Is a directory
/etc/apache2/mods-enabled/php5.conf:# SetHandler application/x-httpd-php
/etc/apache2/mods-enabled/php5.conf:# SetHandler application/x-httpd-php-source
/etc/apache2/mods-enabled/proxy_balancer.conf: # SetHandler balancer-manager
/etc/apache2/mods-enabled/php5.conf.save:# SetHandler application/x-httpd-php
/etc/apache2/mods-enabled/php5.conf.save:# SetHandler application/x-httpd-php-source
/etc/apache2/mods-enabled/status.conf: SetHandler server-status
Even after commenting out the php5 handlers I still get the same user , www-data. Note that I do not have a php7 handler in there.
GNU nano 2.2.6 File: /etc/apache2/mods-enabled/php5.conf
#<FilesMatch “.+.ph(p[345]?|t|tml)$”>
SetHandler application/x-httpd-php
#
<FilesMatch “.+.phps$”>
SetHandler application/x-httpd-php-source
# Deny access to raw php sources by default
# To re-enable it's recommended to enable access to the files
# only in specific virtual host or directory
Require all denied
# Deny access to files without filename (e.g. '.php')
#
# Require all denied
#
Running PHP scripts in user directories is disabled by default
To re-enable PHP in user directories comment the following lines
(from <IfModule …> to .) Do NOT set it to On as it
prevents .htaccess files from disabling it.
php_admin_flag engine OffRestarting php-fpm and apache2
Environment
Variable Value
USER www-data
HOME /var/www
I even removed php5.6 so php7 is the only version on the system, still same results. Anybody know how to fix this? I lover php7, really fast.
Output of ls -la /etc/apache2/mods-enabled/
~# ls -la /etc/apache2/mods-enabled/
total 8
drwxr-xr-x 2 root root 4096 Aug 25 11:27 .
drwxr-xr-x 9 root root 4096 Aug 25 13:10 …
lrwxrwxrwx 1 root root 36 Aug 21 11:50 access_compat.load -> …/mods-available/access_compat.load
lrwxrwxrwx 1 root root 30 Aug 21 11:52 actions.conf -> …/mods-available/actions.conf
lrwxrwxrwx 1 root root 30 Aug 21 11:52 actions.load -> …/mods-available/actions.load
lrwxrwxrwx 1 root root 28 Aug 21 11:50 alias.conf -> …/mods-available/alias.conf
lrwxrwxrwx 1 root root 28 Aug 21 11:50 alias.load -> …/mods-available/alias.load
lrwxrwxrwx 1 root root 33 Aug 21 11:50 auth_basic.load -> …/mods-available/auth_basic.load
lrwxrwxrwx 1 root root 44 Aug 21 11:52 auth_digest.load -> /etc/apache2/mods-available/auth_digest.load
lrwxrwxrwx 1 root root 33 Aug 21 11:50 authn_core.load -> …/mods-available/authn_core.load
lrwxrwxrwx 1 root root 33 Aug 21 11:50 authn_file.load -> …/mods-available/authn_file.load
lrwxrwxrwx 1 root root 33 Aug 21 11:50 authz_core.load -> …/mods-available/authz_core.load
lrwxrwxrwx 1 root root 33 Aug 21 11:50 authz_host.load -> …/mods-available/authz_host.load
lrwxrwxrwx 1 root root 32 Aug 21 11:50 authz_svn.load -> …/mods-available/authz_svn.load
lrwxrwxrwx 1 root root 33 Aug 21 11:50 authz_user.load -> …/mods-available/authz_user.load
lrwxrwxrwx 1 root root 32 Aug 21 11:50 autoindex.conf -> …/mods-available/autoindex.conf
lrwxrwxrwx 1 root root 32 Aug 21 11:50 autoindex.load -> …/mods-available/autoindex.load
lrwxrwxrwx 1 root root 26 Aug 21 11:52 cgi.load -> …/mods-available/cgi.load
lrwxrwxrwx 1 root root 39 Aug 21 11:52 dav_fs.conf -> /etc/apache2/mods-available/dav_fs.conf
lrwxrwxrwx 1 root root 39 Aug 21 11:52 dav_fs.load -> /etc/apache2/mods-available/dav_fs.load
lrwxrwxrwx 1 root root 26 Aug 21 11:50 dav.load -> …/mods-available/dav.load
lrwxrwxrwx 1 root root 30 Aug 21 11:50 dav_svn.conf -> …/mods-available/dav_svn.conf
lrwxrwxrwx 1 root root 30 Aug 21 11:50 dav_svn.load -> …/mods-available/dav_svn.load
lrwxrwxrwx 1 root root 30 Aug 21 11:50 deflate.conf -> …/mods-available/deflate.conf
lrwxrwxrwx 1 root root 30 Aug 21 11:50 deflate.load -> …/mods-available/deflate.load
lrwxrwxrwx 1 root root 26 Aug 21 11:50 dir.conf -> …/mods-available/dir.conf
lrwxrwxrwx 1 root root 26 Aug 21 11:50 dir.load -> …/mods-available/dir.load
lrwxrwxrwx 1 root root 26 Aug 21 11:50 env.load -> …/mods-available/env.load
lrwxrwxrwx 1 root root 28 Aug 21 11:50 fcgid.conf -> …/mods-available/fcgid.conf
lrwxrwxrwx 1 root root 28 Aug 21 11:50 fcgid.load -> …/mods-available/fcgid.load
lrwxrwxrwx 1 root root 29 Aug 21 11:50 filter.load -> …/mods-available/filter.load
lrwxrwxrwx 1 root root 27 Aug 21 11:50 mime.conf -> …/mods-available/mime.conf
lrwxrwxrwx 1 root root 27 Aug 21 11:50 mime.load -> …/mods-available/mime.load
lrwxrwxrwx 1 root root 34 Aug 21 11:50 mpm_prefork.conf -> …/mods-available/mpm_prefork.conf
lrwxrwxrwx 1 root root 34 Aug 21 11:50 mpm_prefork.load -> …/mods-available/mpm_prefork.load
lrwxrwxrwx 1 root root 34 Aug 21 11:50 negotiation.conf -> …/mods-available/negotiation.conf
lrwxrwxrwx 1 root root 34 Aug 21 11:50 negotiation.load -> …/mods-available/negotiation.load
lrwxrwxrwx 1 root root 47 Aug 21 11:52 proxy_balancer.conf -> /etc/apache2/mods-available/proxy_balancer.conf
lrwxrwxrwx 1 root root 47 Aug 21 11:52 proxy_balancer.load -> /etc/apache2/mods-available/proxy_balancer.load
lrwxrwxrwx 1 root root 38 Aug 21 11:52 proxy.conf -> /etc/apache2/mods-available/proxy.conf
lrwxrwxrwx 1 root root 46 Aug 21 11:52 proxy_connect.load -> /etc/apache2/mods-available/proxy_connect.load
lrwxrwxrwx 1 root root 33 Aug 21 12:48 proxy_fcgi.load -> …/mods-available/proxy_fcgi.load
lrwxrwxrwx 1 root root 43 Aug 21 11:52 proxy_http.load -> /etc/apache2/mods-available/proxy_http.load
lrwxrwxrwx 1 root root 38 Aug 21 11:52 proxy.load -> /etc/apache2/mods-available/proxy.load
lrwxrwxrwx 1 root root 40 Aug 21 11:52 rewrite.load -> /etc/apache2/mods-available/rewrite.load
lrwxrwxrwx 1 root root 31 Aug 21 11:50 setenvif.conf -> …/mods-available/setenvif.conf
lrwxrwxrwx 1 root root 31 Aug 21 11:50 setenvif.load -> …/mods-available/setenvif.load
lrwxrwxrwx 1 root root 44 Aug 21 11:52 slotmem_shm.load -> /etc/apache2/mods-available/slotmem_shm.load
lrwxrwxrwx 1 root root 36 Aug 21 11:52 socache_shmcb.load -> …/mods-available/socache_shmcb.load
lrwxrwxrwx 1 root root 26 Aug 21 11:52 ssl.conf -> …/mods-available/ssl.conf
lrwxrwxrwx 1 root root 26 Aug 21 11:52 ssl.load -> …/mods-available/ssl.load
lrwxrwxrwx 1 root root 29 Aug 21 11:50 status.conf -> …/mods-available/status.conf
lrwxrwxrwx 1 root root 29 Aug 21 11:50 status.load -> …/mods-available/status.load
lrwxrwxrwx 1 root root 29 Aug 21 11:52 suexec.load -> …/mods-available/suexec.load
I fgrepped all the files, there is a ‘SetHandler’ in there.
:/etc/apache2/mods-enabled# fgrep ‘SetHandler’ *
proxy_balancer.conf: # SetHandler balancer-manager
status.conf: SetHandler server-status
Content of servers-status:
GNU nano 2.2.6 File: status.conf
<Location /server-status>
SetHandler server-status
Require local
#Require ip 192.0.2.0/24
</Location>
# Keep track of extended status information for each request
ExtendedStatus On
# Determine if mod_status displays the first 63 characters of a request or
# the last 63, assuming the request itself is greater than 63 chars.
# Default: Off
#SeeRequestTail On
<IfModule mod_proxy.c>
# Show Proxy LoadBalancer status in mod_status
ProxyStatus On
</IfModule>