- Knowledgebase Home
- » Browse by Service
- » (dv) Dedicated-Virtual Server
- » (dv) 3.5
- » Web Applications
- Knowledgebase Home
- » Browse by Service
- » (dv) Dedicated-Virtual Server
- » (dv) 4.0
- » Web Applications
Why is my vhost file not being used by Apache?
Overview
The most common reason for the Apache webserver not being able to use your vhost file are usually related to permissions.
Requirements
Before you start, this article has the following dependencies:
- You must have SSH access set up for root or a sudo user.
End of Life Warning
This service has a pending End of Life. Please move to a current service as soon as possible. For more information, please see: (dv) Dedicated-Virtual 4.0: Migration Information.
Instructions
-
Log into your server as root using SSH, and enter the following command to change the owner of all files in the conf directory to the apache user:
chown -R apache /var/www/vhosts/example.com/conf -
Change the permissions to ensure the Apache user can read all of the files in the conf directory:
chmod -R 644 /var/www/vhosts/example.com/conf -
Reconfigure your server to use the new vhost.conf file using Plesk's websrvmng command:
/usr/local/psa/admin/sbin/httpdmng --reconfigure-all/usr/local/psa/admin/sbin/websrvmng -a -v
1. Anonymous/usr/local/psa/admin/sbin/websrvmng -a -v returns a 'command not found' error. So does httpdmng Both are visible in the directory.
2. Elite It sounds like you're running the command for a (dv) 3.5 on a (dv) 4.0. For the (dv) 4.0, use: /usr/local/psa/admin/sbin/httpdmng --reconfigure-all Be sure to click the tab at the top of the article for your service.