Help - Search - Members - Calendar
Full Version: Where to add httpd.conf settings [PLESK 7.5.4]
The Planet Forums > Control Panels > Plesk
DRYALLS
When I create domains, PLESK is creating an httpd.conf file per domain which is fair enough. Subdomains are added to the same file, also fair enough.

But if I edit the file in SSH, then add another subdomain, my edits are lost.

How can I ensure that any edits I make are preserved, or include my own file in httpd.conf?

Thanks in advance for any help.
Gromit
Hiya Dryalls,

Here's the page in the Plesk Documentation that explains how to do what you're asking. Basically, you create a seperate file, named "vhost.conf", and tell Plesk to check for it:

http://download1.swsoft.com/Plesk/Plesk7.5...tml/apas02.html

QUOTE
Customizable httpd.include per domain and subdomain:

In Plesk each domain has virtual hosts configuration stored in a separate file:

/home/httpd/vhosts//conf/httpd.include  

This file is overwritten each time the virtual host configuration is changed, thus any manual alterations made to the file are discarded. To use custom directives or redefine those inserted by Plesk , you need to create the files vhost.conf and/or vhost_ssl.conf with necessary directives in the directory /path_to_vhosts//conf/ for a domain, and /path_to_vhosts//subdomains//conf/ for a subdomain.

If any of these files exist by the time the main configuration file is generated, Plesk inserts the appropriate Include directive into the HTTP and/or HTTPS virtual host context respectively.

For security reasons, only root can create the vhost.conf and vhost_ssl.conf files.

For the changes to take effect, you need to run the following:

/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=


I hope this helps!
-Joe
DRYALLS
That's perfect thanks. Not only does it answer the question, it points me at a new PLESK resource that I did not know existed. icon_smile.gif
otarawai
I want to add security to each subdomain on my server. Security works fine when you add
AuthType Basic
AuthName "Banner Name"
AuthUserFile /etc/auth-file
Require user username

to the home/httpd/vhosts/domain/conf/httpd.include file, but when added to the /home/httpd/vhosts/secondsphere.info/subdomains//conf/vhost.conf file it does not work. I have restarted plesk and it has added the include to the httpd.include within the subdomain virtualhost:
Include /home/httpd/vhosts/secondsphere.info/subdomains/name/conf/vhost.conf

but security dosn't work!
I can't just add security to the main httpd.includes as it gets rewritten.
Help is appreciated
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.