Execute PHP outside of home directoy
Hello guys,
I'm using CPanel with Cloudlinux (cageFS, LVE, etc..)
I need to execute a PHP file who will be the same for every hosting account, so this file is shared on a different folder, outside from /home/clientAccount, I want to use an Apache Alias for that.
Example :
https://mywebsite45.com/api_test_xxxxx/show-error.php?uid=184715635058e74417d9084559844178&v=0.4.89
https://anotherwebsite.com/api_test_xxxxx/show-error.php?uid=184715635058e74417d9084559844178&v=0.4.89
I added an Apache alias on "Pre VirtualHost Include"
Alias "/api_test_xxxxx" "/opt/myfolder/myfolderapi/"
So after restarting Apache, my alias works well because instead of getting a 404 I got a 501 Not Implemented with this message :
Not supported
I would like to know how I can allow Apache to execute my PHP script, which configuration I'm missing ?
I'm using PHP with CGI.
-
Hello, I don't believe this action is recommended due to security restrictions. Instead, you should upload a separate copy of this PHP file to each account, or setup a cron job that populates an updated copy of this PHP file to each account on a regular basis. Thank you. 0
Please sign in to leave a comment.
Comments
1 comment