How to include UserDir paths to ProxyPass - Apache 2.4.7 on Ubuntu 14.04

393 Views Asked by At

I have this configuration:

Ubuntu Server 14.04

Apache 2.4.7 with proxy_module

PHP 5.5.9 + PHP5-FPM

I am passing all request for PHP files, with the php file extension, to the PHP wrapper through FastCGI with the following command:

ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/html/$1

Now the problem is that when I am accessing the server with the following URL http://127.0.0.1/~myuser/phpinfo.php I receive File not found

If I am accessing it like this http://127.0.0.1/phpinfo.php it's working.

My question is how can I get rid of File not found error when I want to access the url with the user in it?

1

There are 1 best solutions below

0
On

You have to add following lines to your httpd configuration

ProxyPassMatch ^/~myuser/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/path/to/myuser/public_html/$1