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 |
<VirtualHost *:80> ServerName e.com ServerAlias www.e.com DocumentRoot /var/www/vhosts/e .com <Directory /var/www/vhosts/e .com> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all < /Directory > ErrorLog /var/log/httpd/example .com-error_log CustomLog /var/log/httpd/example .com-access_log common < /VirtualHost > |
Reloading Apache Configuration
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.1450091469.txt.gz · Last modified: 2024/05/23 07:26 (external edit)