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> 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:
service httpd reloadCentOS/RHL 7:
systemctl reload httpd
apache_vhost_centos.1450091469.txt.gz · Last modified: 2024/05/23 07:26 (external edit)