HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=15)
-   -   External Apache Directives (http://www.howtoforge.com/forums/showthread.php?t=40525)

vaio1 29th October 2009 18:51

External Apache Directives
 
Hi Falko and Till,

I'm trying to add some items inside the Apache directives but when I try to save the site details page the text is truncated.

I admit that I have paste about 3000 rows inside it because we have a customer with thousands of domains that redirect only in one site. So I thought to ask you if there is a way to create an external file to attach to the apache directives.

Is it possible?

These are only two domains that I redirect to the main php controller folder:
Code:

RewriteCond %{HTTP_HOST} [a-z]\.website1000\.[a-z]+$ [NC]
RewriteRule ^/(.*)        http://www.website1000.com/public/$1 [L]

RewriteCond %{HTTP_HOST} [a-z]\.website1001\.[a-z]+$ [NC]
RewriteRule ^/(.*)        http://www.website1001.com/public/$1 [L]

thanks for your precious help.

till 30th October 2009 08:51

You can use the apache include directive in the apache directives field to include a external file in into the vhost configuration.

vaio1 30th October 2009 12:41

Is it correct?

Include /var/www/web1/web/my.conf

till 30th October 2009 12:44

Yes, should work like that.

vaio1 30th October 2009 12:48

Have I restart the apache?

vaio1 30th October 2009 13:55

Quote:

Originally Posted by till (Post 209073)
Yes, should work like that.

I have tested your suggestions but I have discovered that the modification of the Apache Directive doesn't copied in the /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf

What I have do:
I have opened the /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf file
then I insert the Include row and I save the file
I have rebooted the apache service and it has worked good

Now I have deleted the Include from the administration Apache Directive page of the customer website and the Include row is disappeared from the /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf

can u help me please? Seems that the Apache Directive doesn't accept the Include directive.

till 30th October 2009 13:57

http://www.howtoforge.com/forums/showthread.php?t=32369

vaio1 30th October 2009 15:36

What do you mean?! I have read it but it doesn't solve the problem.

vaio1 30th October 2009 16:42

Quote:

Originally Posted by till (Post 209080)

Seems that the Include is ignored from the Apache directives Option

till 30th October 2009 16:57

Quote:

Seems that the Include is ignored from the Apache directives Option
Thats not the case. I use it for several sites.

You posted above that your httpd.conf file does not get written, so please do what I described in the other thread that I linked above to find the problem in your httpd.conf.


All times are GMT +2. The time now is 12:25.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.