PDA

View Full Version : UI Problem with additonal Apache directives


tstich
19th October 2005, 10:22
In the WEB configuration page:

When i add some additional apache directives to a web that contain something like this %{HTTP_HOST}. The part with the {} is removed from the textbox after updating the database. The data however is stored correctly in the database.

Example:

RewriteCond %{HTTP_HOST} ^.*$
...

After saving the changes the text box shows

RewriteCond % ^.*$


Thanks,
Timo

tstich
3rd November 2005, 12:08
...any idea if this is a bug?

It gets very anoying! Every time i open the web config with the problematic web, the database gets updated with the content of the text box. Which is the original directives minus the {HTTP_HOST} variable.
So i have to enter the {HTTP_HOST} over and over to make this web run :mad:

Please help!
Thanks a lot.

till
3rd November 2005, 12:40
Thats a problem with the templating library that ISPConfig uses. It strips off the {} from the content. I think there is no solution yet.

Workaround: Define the part you want to be included in an extra file and include this in the httpd.conf

1) Make a directory /etc/apache/vhost_includes/
2) Make a text file www.mydomain.com.conf inside this directory which contains the rewrite rules you want to add to the vhost.
3) In the apache directives field in ISPConfig you insert:

Include /etc/apache/vhost_includes/www.mydomain.com.conf

tstich
3rd November 2005, 14:11
Thanks for your helpful answer!
Your workaround works fine :-)

-Timo