• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

Issue Apache user changes with directive. - Why?

Sebastian

New Pleskian
When I run a simple php web page that echos out the apache user with
PHP:
echo exec('whoami');
it gives me the expected system user, e.g.
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>
the user changes to
Code:
www-data
Question: Why? And how can I avoid this?
 
Last edited:
I think that explanation in this thread could be interesting for you Resolved - apache run whit customer user not whit www-data
I read this before, but it does not help here.
What UFHH01 points out there is a warning not to mess around with config files to force apache to use another user. And I can second that.
E.g. I have played around with /etc/apache2/envvars and changed the APACHE_RUN_USER and APACHE_RUN_GROUP, but that (at least) broke the Plesk log file viewer, so I had to reverse it.
 
Back
Top