How to create an Apache HTTP Virtual Host
- You must first Install and Configure Apache HTTP Server
- Create/Open the file /etc/httpd/conf.d/$domain.confwith the following text replacing variables where necessary
# $domain HTTP Virtual Host
<VirtualHost *:80>
# General
ServerAdmin $webmaster_email
DocumentRoot /var/www/html/$domain
ServerName www.$domain
ServerAlias $domain
# Logging
ErrorLog logs/$domain-error_log
CustomLog logs/$domain-access_log common
</VirtualHost>
- Restart the Apache HTTP Server daemon
service httpd restart
No comments:
Post a Comment