Current time: 05-06-2024, 08:13 PM Hello There, Guest! (LoginRegister)


Post Reply 
custom apache2 configs for domains
Author Message
jemmrich Offline
Junior Member
*

Posts: 24
Joined: Nov 2008
Reputation: 0
Post: #1
custom apache2 configs for domains
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
05-27-2009 12:50 PM
Visit this user's website Find all posts by this user Quote this message in a reply
MasterTH Offline
Member
***

Posts: 570
Joined: Feb 2009
Reputation: 4
Post: #2
RE: custom apache2 configs for domains
/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.
05-27-2009 02:43 PM
Find all posts by this user Quote this message in a reply
jemmrich Offline
Junior Member
*

Posts: 24
Joined: Nov 2008
Reputation: 0
Post: #3
RE: custom apache2 configs for domains
(05-27-2009 02:43 PM)MasterTH Wrote:  /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.

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
05-28-2009 05:35 AM
Visit this user's website Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #4
RE: custom apache2 configs for domains
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 Smile
05-28-2009 03:41 PM
Visit this user's website Find all posts by this user Quote this message in a reply
jemmrich Offline
Junior Member
*

Posts: 24
Joined: Nov 2008
Reputation: 0
Post: #5
RE: custom apache2 configs for domains
(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.

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 Smile

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
05-28-2009 05:00 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)