Individual subdomains

Added configuration to server (XServer) to run different PHP only for subdomains.

First, add the following to “.htaccess”.

Action myphp-script /php.cgi
AddHandler myphp-script .php

Next, save the following in php.cgi and upload it to the root (specify 705 permissions).

#!/usr/bin/sh
exec /usr/bin/php7.2-cgi

That is all.

Leave a comment on the article