Help - Search - Members - Calendar
Full Version: Protecting the conf.include file
The Planet Forums > Control Panels > Plesk
bamaster
Once I create a virtual host for a domain via Plesk, a conf.include file is created in the domain's conf folder.

If I make changes to this, are my changes safe?

Someone mentioned that Apache/Plesk might overwrite the file once it server is rebooted.

Thanks in advance.
Squire
conf.include?

Plesk will automatically create an httpd.include file in the /home/httpd/vhosts/domain.com/conf directory for each domain. I think this is what you're referring to?

Yes, this file gets overwritten. If you want to make changes to a site's configuration create a vhost.conf file in this same directory and rebuild the domain with the websrvmng utility.
bamaster
QUOTE
Originally posted by Squire
conf.include?

Plesk will automatically create an httpd.include file in the /home/httpd/vhosts/domain.com/conf directory for each domain.  I think this is what you're referring to?

Yes, this file gets overwritten.  If you want to make changes to a site's configuration create a vhost.conf file in this same directory and rebuild the domain with the websrvmng utility.



hehe, yes, I was referring to the httpd.include file... sorry.

I did as you said and it works perfectly. Thank you for that.

Nuther question... the apache generated httpd.conf file has this in it:

[PHP]
ServerName secure.musclesmart.com:80[/PHP]

This gives http://secure.musclesmart.com a webpage (Plesk generates a default page) but I don't want that page to show up.

How can I force that URL to deliver the https location, where I have a ssl cert installed? I'd rather not do it by a client side re-direct.

Any thoughts?
Squire
Well, there are lots of ways to do it.

Personally, I would probably just stick a .htaccess file with a 301 Redirect in the secure subdomain area on the non-SSL side of thing. Something along the lines of the following in that "secure" subdomain folder should do the trick:
[PHP]Redirect 301 / https://secure.musclemart.com/[/PHP]

Tha'll give you a server side redirect, taking it out of the browser's control, yet keep you from having to tweak Apache configs. Seems like the easiest way to me.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.