• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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