Shiver me timbers!
I would like to have a special documentroot for just one domain and I am wondering if I am going about it correctly.
In /usr/local/apache/conf/extra/ I found this interesting file, httpd-vhosts.conf.
I am hosting several domains. All except one will have the default documentroot.
Is this all I need to have?
Also, if something goes wrong and I want to disable virtual hosting because the httpd-vhosts.conf is incorrect how would I let apache know to ignore the erroneous httpd-vhosts.conf file?
Thanks!
I would like to have a special documentroot for just one domain and I am wondering if I am going about it correctly.
In /usr/local/apache/conf/extra/ I found this interesting file, httpd-vhosts.conf.
I am hosting several domains. All except one will have the default documentroot.
Is this all I need to have?
If my domain name is domain.com with the document root in /home/evan/public_html/wordpress would the httpd-vhosts.conf look like this?NameVirtualHost *:80
# VirtualHost example:
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/usr/local/apache/docs/dummy-host.example.com"
ServerName dummy-host.example.com
ServerAlias www.dummy-host.example.com
ErrorLog "logs/dummy-host.example.com-error_log"
CustomLog "logs/dummy-host.example.com-access_log" common
</VirtualHost>
How would I let apache know that I am using virtual hosts?NameVirtualHost *:80
# VirtualHost example:
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/home/evan/public_html/wordpress"
ServerName evan.com
ServerAlias http://www.domain.com
ErrorLog "<some path here>"
CustomLog "some other path here" common
</VirtualHost>
Also, if something goes wrong and I want to disable virtual hosting because the httpd-vhosts.conf is incorrect how would I let apache know to ignore the erroneous httpd-vhosts.conf file?
Thanks!
Last edited: