Hi,
I want to configure four different domains, each with its own web directory:
When I start apache:
Questions:
1. How do I add FQDN to /etc/hosts?
2. How do I set up NameVirtualHost directives?
Best Regards,
bsus
I want to configure four different domains, each with its own web directory:
Code:
<VirtualHost 192.168.178.*:80>
ServerAdmin support@example.com
DocumentRoot "/usr/local/www/apache22/data"
ServerName www.fritz.box
ErrorLog "/var/log/www.fritz.box-error_log"
CustomLog "/var/log/www.fritz.box-access_log" common
</VirtualHost>
<VirtualHost www.test.de:80>
ServerAdmin support@test.de
DocumentRoot "/usr/local/www/apache22/data/test"
ServerName www.testcenter.com
ErrorLog "/var/log/www.test.de-error_log"
CustomLog "/var/log/www.test.de-access_log" common
</VirtualHost>
<VirtualHost cloud.example.com:80>
ServerAdmin support@example.com
DocumentRoot "/usr/local/www/apache22/data/example/owncloud"
ServerName cloud.example.de
ErrorLog "/var/log/cloud.example.com-error_log"
CustomLog "/var/log/cloud.example.com-access_log" common
</VirtualHost>
When I start apache:
Code:
Performing sanity check on apache22 configuration:
[Wed May 02 18:14:03 2012] [error] (EAI 4)Non-recoverable failure in name resolution: Could not resolve host name 192.168.178.* -- ignoring!
[Wed May 02 18:14:03 2012] [warn] VirtualHost www.test.de:80 overlaps with VirtualHost cloud.example.com:80, the first has precedence, perhaps you need a NameVirtualHost directive
[Wed May 02 18:14:03 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
Syntax OK
Stopping apache22.
Waiting for PIDS: 67861.
Performing sanity check on apache22 configuration:
[Wed May 02 18:14:03 2012] [error] (EAI 4)Non-recoverable failure in name resolution: Could not resolve host name 192.168.178.* -- ignoring!
[Wed May 02 18:14:03 2012] [warn] VirtualHost www.test.de:80 overlaps with VirtualHost cloud.example.com:80, the first has precedence, perhaps you need a NameVirtualHost directive
[Wed May 02 18:14:03 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
Syntax OK
Starting apache22.
[Wed May 02 18:14:03 2012] [error] (EAI 4)Non-recoverable failure in name resolution: Could not resolve host name 192.168.178.* -- ignoring!
[Wed May 02 18:14:03 2012] [warn] VirtualHost www.test.de:80 overlaps with VirtualHost cloud.example.com:80, the first has precedence, perhaps you need a NameVirtualHost directive
[Wed May 02 18:14:03 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
Questions:
1. How do I add FQDN to /etc/hosts?
2. How do I set up NameVirtualHost directives?
Best Regards,
bsus