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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
<VirtualHost *:80> ServerAdmin webmaster@example.com 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 > |
Restarting Apache
Once the vhost has been created you will need to reload apache for the configuration to take effect:
CentOS/RHL 5,6:
1 |
service httpd reload |
1 |
systemctl reload httpd |
apache_vhost_centos.1427695579.txt.gz · Last modified: 2024/05/23 07:26 (external edit)