• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Need domain.com to docroot subdomain in vhost.conf

S

sector29

Guest
Hello,

How do I change vhost.conf so that domain.com/httpdocs, www.domain.com/httpdocs and IP/httpdocs point to subdomain.domain.com/httpdocs.

I've tried to insert DocumentRoot into vhost.conf but it doesnt work for me (yet?).

I intend to use the original domain.com/httpdocs as a storage area for symlinking.

currently vhost looks like most of the posts i've read
<Directory /home/httpd/vhosts/<domain>/httpdocs>
php_admin_value open_basedir /home/httpd/vhosts/<domain>/httpdocs
php_admin_value safe_mode 0
php_admin_value max_execution_time 6000
</Directory>

Also, does "safe_mode 0" turn off safe_mode? How is it turned off for a specific domain.
 
Also, does "safe_mode 0" turn off safe_mode? How is it turned off for a specific domain.
Yes it turns off safe mode. When you put those statements/directives into a vhost.conf file for a given domain, it will affect *that* domain.

After making changes to vhost.conf, you must remember to do the following commands at the SSH shell prompt:

/usr/local/psa/admin/bin/websrvmng -u --vhost-name=domain.com
service httpd restart

Note: Replace 'domain.com' with the name of the domain you are reconfiguring. There are many ways of restarting httpd/Apache, so depending on your OS that command may be a bit different.

For your other question 'How do I change vhost.conf so that domain.com/httpdocs, www.domain.com/httpdocs and IP/httpdocs point to subdomain.domain.com/httpdocs.' This would be done using RewriteCond and RewriteRule directives in the vhost.conf for the domains you wish to redirect. There are many recent posts where I have given examples.
 
Back
Top