apache_vhost_centos
This is an old revision of the document!
Configuring (all distributions)
Default configuration file: /etc/httpd/conf.d/
You will need to create a vhost in this directory, with the file ending in .conf.
For example:
/etc/httpd/conf.d/example.co.uk.conf
Example vhost for apache
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/vhosts/example.com
<Directory /var/www/vhosts/example.com>
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ErrorLog logs/example.com-error_log
CustomLog logs/example.com-access_log common
</VirtualHost>
Once the vhost has been created you will need to reload apache for the configuration to take effect:
CentOS/RHL 5,6:
service httpd restartCentOS/RHL 7:
systemctl restart httpd
apache_vhost_centos.1427539496.txt.gz · Last modified: 2024/05/23 07:26 (external edit)
