Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 18th June 2013, 14:53
jaypabs jaypabs is offline
Member
 
Join Date: Jun 2013
Posts: 68
Thanks: 0
Thanked 1 Time in 1 Post
Default Virtual Host (vhost file) reset after updating web domain configuration

After editing website configuration using ISPConfig 3, under Sites tab > website, the vhost file created by ISPConfig was reset automatically to it's default value.

All the custom config that I added was lost.

Example I set the following line to:

Code:
        server_name mysite.com www.philnews.ph;

        root   /var/www/mysite.com/web;

        index index.php index.htm index.html index.cgi index.pl index.xhtml;
Now, when I update the site "mysite.com, the vhost reset to default like:

Code:
        index index.html index.htm index.php index.cgi index.pl index.xhtml;
Notice the php file will move again to the 3rd location.

Note that this happen to anything that you change in the web domain config like changing the password of "Webstatistics" under statistics tab.

How to prevent this?
Reply With Quote
Sponsored Links
  #2  
Old 18th June 2013, 15:18
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,202
Thanks: 829
Thanked 5,420 Times in 4,262 Posts
Default

Quote:
After editing website configuration using ISPConfig 3, under Sites tab > website, the vhost file created by ISPConfig was reset automatically to it's default value.
Yes, thats intended. The vhost files made by ispconfig shall not be altered manually. If you want to add any apache code to a vhsot file, use the apache directives field on the options tab of the website settings.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 18th June 2013, 15:25
jaypabs jaypabs is offline
Member
 
Join Date: Jun 2013
Posts: 68
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by till View Post
Yes, thats intended. The vhost files made by ispconfig shall not be altered manually. If you want to add any apache code to a vhsot file, use the apache directives field on the options tab of the website settings.
Can you please give me an example of directives on how to change the order of index? Like I want to make index.php the first index rather than index.html.

BTW, I'm using Nginx.

Thank you
Reply With Quote
  #4  
Old 19th June 2013, 10:41
ItsDom ItsDom is offline
Member
 
Join Date: Dec 2012
Posts: 41
Thanks: 2
Thanked 5 Times in 5 Posts
Default

Login as admin, go to sites, select the domain, go to the options tab, add your directives in the "nginx directives"

I've found in the past that putting directives not in some kind of location container can cause conflicts, so try this:

Code:
location / {
   index index.php index.htm index.html index.cgi index.pl index.xhtml;
}

I think you need to be logged in as admin though for the "options" tab to be visible.
At the risk of thread hi-jacking: does anyone know if it is possible to allow clients to view and change options?
Reply With Quote
  #5  
Old 19th June 2013, 11:16
jaypabs jaypabs is offline
Member
 
Join Date: Jun 2013
Posts: 68
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by ItsDom View Post
Login as admin, go to sites, select the domain, go to the options tab, add your directives in the "nginx directives"

I've found in the past that putting directives not in some kind of location container can cause conflicts, so try this:

Code:
location / {
   index index.php index.htm index.html index.cgi index.pl index.xhtml;
}

I think you need to be logged in as admin though for the "options" tab to be visible.
At the risk of thread hi-jacking: does anyone know if it is possible to allow clients to view and change options?
That works, but is this a good practice? Because the old index is not removed above. This make two index.
Reply With Quote
  #6  
Old 19th June 2013, 11:48
ItsDom ItsDom is offline
Member
 
Join Date: Dec 2012
Posts: 41
Thanks: 2
Thanked 5 Times in 5 Posts
Default

I'm not sure it's "good practice" but it's the advised way of doing it by people that know a lot (http://www.howtoforge.com/forums/sho...82&postcount=4)

I think it's to do with a quirk in how ISPConfig synchronizes/updates the vhosts files.

I THINK it effectively has a vhosts template which has things such as root, index, directives to get php working etc. When synchronizing, ISPConfig basically just adds the directives from the options field into the template without actually changing the template. If you look at the thread I link to in the first paragraph here, when I didn't put the "root" directive in a location container, there were complaints because there were 2 root directives at the same level suggesting it was just appending the root directive to the template, rather than updating bits within the template.

This maybe wrong, or a gross over-simplification but that seems to be how it works. I'm sure someone will correct me
Reply With Quote
  #7  
Old 19th June 2013, 11:49
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,202
Thanks: 829
Thanked 5,420 Times in 4,262 Posts
Default

Quote:
At the risk of thread hi-jacking: does anyone know if it is possible to allow clients to view and change options?
Thats not possble as it would allow your clients to take over your server.

Quote:
That works, but is this a good practice? Because the old index is not removed above. This make two index.
Yes, thats ok.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #8  
Old 19th June 2013, 12:04
jaypabs jaypabs is offline
Member
 
Join Date: Jun 2013
Posts: 68
Thanks: 0
Thanked 1 Time in 1 Post
Default

Thanks for the reply.

I have another question about how to override the error_page. My wordpress site has its own error handling. By default, it is embedded in wordpress. So how can I remove error_page in the nginx directive?
Reply With Quote
  #9  
Old 19th June 2013, 12:12
ItsDom ItsDom is offline
Member
 
Join Date: Dec 2012
Posts: 41
Thanks: 2
Thanked 5 Times in 5 Posts
Default

Go into ISPConfig control panel, select the site, under the "domain tab" untick the "Own Error-Documents" should really do it... not sure if that removes the error handling totally from nginx or just point it to a global set of error pages though... Give it a try.
Reply With Quote
  #10  
Old 19th June 2013, 12:15
jaypabs jaypabs is offline
Member
 
Join Date: Jun 2013
Posts: 68
Thanks: 0
Thanked 1 Time in 1 Post
 
Default

Quote:
Originally Posted by ItsDom View Post
Go into ISPConfig control panel, select the site, under the "domain tab" untick the "Own Error-Documents" should really do it... not sure if that removes the error handling totally from nginx or just point it to a global set of error pages though... Give it a try.
My bad. I did not notice it. It actually removes the error handling.

thanks
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Freeradius and Mysql uvstudios HOWTO-Related Questions 4 19th February 2014 12:11
Postfix/courier/Centos 6 cant send email to external email servers maxtorzito Installation/Configuration 14 7th October 2011 10:56
freebsd 7, samba 3, domain controller alexdimarco Suggest HOWTO 6 5th November 2010 16:54
rkhunter report Captain Installation/Configuration 6 10th October 2010 13:05
I can't finish install due a problem Sam9999 Installation/Configuration 7 17th September 2010 22:33


All times are GMT +2. The time now is 03:21.


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