0

Having a problem with url's via an Alias. It's an Centos7 machine, running custombuild 2.0 Directadmin.

The Alias itself is working, but the PHP is not parsed when it's set to a directory of A user who's owning all the domains.

httpd-alias.conf Alias /shared /home/[user]/shared/

Tried everything with permissions, openbasedir, proxypass, etc

Who's having the right answer for me? Struggling for 2 days now.

Looks like the alias /shared needs additional php parse settings somewhere. And this is a PHP_FPM issue, with PHP-MOD it works.

1 Answers1

0

The working answer to this question after trying everything else is; (replace [user] with your username.)

add a (custom) file in /usr/local/directadmin/data/templates/custom/ virtual_host2.conf.pre

<Directory "/home/[user]/shared">
    <FilesMatch "\.(inc|php|phtml|phps|php74)$">
        AddHandler "proxy:unix:/usr/local/php74/sockets/[user].sock|fcgi://localhost/" .inc .php .phtml .php74
    </FilesMatch> 
    <IfModule mod_fcgid.c>
        SuexecUserGroup [user] [user]
    </IfModule>
</Directory>

Make the Alias in httpd-alias (also use the custom template ofcourse)

shared /home/[user]/shared

./build rewrite_confs

And the Alias is working, and the PHP is getting parsed.