- Plesk Onyx for Linux
How to manually set up or customize
vhost.conf on the server?
Note: replace example.com with actual domain name in the file path.
1. Connect to the server via SSH
2. Create or open
/var/www/vhosts/system/example.com/conf/vhost.conf file and add necessary directives into it using any text editor:
# vi /var/www/vhosts/system/example.com/conf/vhost.conf
3. Restart Apache:
# service httpd restart
4. Run the following command to apply new configuration:
# plesk sbin httpdmng --reconfigure-domain example.com
vhost.conf is already created manually or through Plesk interface, just restart Apache to apply the changes.
vhost.conf file is automatically created in
/var/www/vhosts/system/example.com/conf/ when additional Apache directives are added for the first time in Domains > example.com > Apache&nginx settings > Additional directives section.
When clicking OK button at Domains > example.com > Apache&nginx settings, Plesk restarts Apache web-server and runs internal
httpdmng utility that re-configures virtual host configuration file and lets Apache know about the additional directives creation.