When I run a simple php web page that echos out the apache user with
it gives me the expected system user, e.g.
When I run the same but with an alias directive in apache settings:
the user changes to
Question: Why? And how can I avoid this?
PHP:
echo exec('whoami');
Code:
bob
When I run the same but with an alias directive in apache settings:
Code:
AliasMatch /appname(/.*)? /var/www/vhosts/domain.dev/httpdocs/apps/appname/$1
Alias /appname /var/www/vhosts/domain.dev/httpdocs/apps/appname
<Directory "/var/www/vhosts/domain.dev/httpdocs/apps/appname">
<IfModule sapi_apache2.c>
php_admin_flag engine on
</IfModule>
<IfModule mod_php7.c>
php_admin_flag engine on
</IfModule>
</Directory>
Code:
www-data
Last edited: