Load specific "php.ini" into a sub-domain

1

To load a custom php.ini for a sub-domain, I applied the following code to .htaccess in the root of the sub-domain in question:

AddHandler php5-fastcgi .php
Action php5-fastcgi /cgi-bin/php.fcgi

The file only has these two lines.

The same loads the settings in conditions and independently of the main domain, which I can see through < strong> phpinfo() .

Problem

With the above line in .htaccess , I can not access the sub-domain, only being able to access it through the main domain followed by the folder where the sub-domain is located:

Intended access:

http://sub.dominio.com/

Access that works with the policies above:

http://www.dominio.com/sub/

Note:
In htaccess in the root of the main domain there are several directives for using mod_rewrite.c , mod_deflate.c , Options , IndexIgnore , Header , which if relevant to the problem I can add here.

Question

What is missing or am I doing wrong to lose direct sub domain access when I have the two lines in .htaccess of it?

    
asked by anonymous 17.02.2014 / 17:02

1 answer

1

Use the PHPINIDir directive in the virtual host configuration of the site for which you want to specify a custom%%.

<VirtualHost 1.2.3.4:80>
    PHPINIDir /var/www/web1
</VirtualHost>
    
17.02.2014 / 17:11