custom apache2 configs for domains - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Support Area (/forum-30.html) +--- Forum: Usage (/forum-34.html) +--- Thread: custom apache2 configs for domains (/thread-6815.html) |
custom apache2 configs for domains - jemmrich - 05-27-2009 12:50 PM Hi everyone, I have searched and looked around but haven't found what I am looking for. I was wondering if it is possible to have custom settings for domains in the apache2 config. A domain I have needs to have the php open_basedir restriction set to something non-standard. I need to access php files that are within a symbolically linked directory. However each time a domain changes everything is reloaded. Is it possible to break down the config file so that each domain has its own config file and is only updated when that particular domain is changed? I have tried modifying open_basedir restriction using an htaccess file but it gives me a 500 internal server error and so far the only way to get the settings i need to work, is to manually edit the /etc/apache2/sites-available/ispcp.conf file. Thanks, James RE: custom apache2 configs for domains - MasterTH - 05-27-2009 02:43 PM /etc/apache2/sites-enabled/ispcp.conf for each site there is an php-config file which can be found in /var/www/fcgi/domain.tld/php%VERSION% You can make your changes to the php-config for the specific domain here. But keep in mind, after creating a new Domain/Subdomain/Alias the PHP-Config would be overwritten by the ispcp-daemon. Theres another way to modify the php-config that is used by the daemon to generate the domain-config. This file could be found /etc/ispcp/fcgi/parts/php%VERSION% But be careful with changes to this file. RE: custom apache2 configs for domains - jemmrich - 05-28-2009 05:35 AM (05-27-2009 02:43 PM)MasterTH Wrote: /etc/apache2/sites-enabled/ispcp.conf Is there a way to do if statements within the files located here /etc/ispcp/fcgi/parts/php%VERSION% I would like to set the open basedir restriction for only one site. For now I guess I will edit the file in /var/www/fcgi/domain.tld/php%VERSION% maybe i change the file permissions to this file so that the daemon can't overwrite it. Thanks, James RE: custom apache2 configs for domains - kilburn - 05-28-2009 03:41 PM The /var/www/fcgi/domain.tld/php5/php.ini file is never overwritten by the panel, so you don't need to change any permissions. On the apache custom config issue, you can set any directives you want in the /etc/apache2/ispcp/domain.tld.conf (which should be empty), as it is included inside the domain.tld VirtualHost and also never overwritten by the panel RE: custom apache2 configs for domains - jemmrich - 05-28-2009 05:00 PM (05-28-2009 03:41 PM)kilburn Wrote: The /var/www/fcgi/domain.tld/php5/php.ini file is never overwritten by the panel, so you don't need to change any permissions. wow thats great to know! now question regarding the apache files in /etc/apache2/ispcp/domain.tld.conf Will it be a problem redeclaring the <directory> stuff when apache restarts or how do i set new settings if they have already been set to something in /etc/apache2/sites-enabled/ispcp.conf |