Reputation: 20545
I am trying to set up two separate DocumentRoot
s in my httpd.conf
.
I have the following:
NameVirtualHost 89.104.220.210
#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/system.dk/html/
ServerName system.dk
ErrorLog /logs/system
CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>
<VirtualHost 89.104.220.210>
ServerAdmin [email protected]
DocumentRoot /var/www/system.dk/html/system/
ServerName system.org
ErrorLog /logs/system
CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>
However when I attempt to restart, it fails to start:
Stopping httpd: [FAILED]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 89.104.220.207 for ServerName
[FAILED]
Can anyone help me out here?
update
I have the following now:
NameVirtualHost 89.104.220.207:80
NameVirtualHost 89.104.220.207:1500
#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
<VirtualHost 89.104.220.207:80>
ServerAdmin [email protected]
DocumentRoot /var/www/system.dk/html
ServerName www.system.dk
ServerAlias system.dk
ErrorLog /var/www/learnbypower.dk/logs/error_log
</VirtualHost>
<VirtualHost 89.104.220.207:1500>
ServerAdmin [email protected]
DocumentRoot /var/www/system/
ServerName system
ServerAlias system.dk
ErrorLog /var/www/system.dk/logs/error_log
</VirtualHost>
Upvotes: 0
Views: 486
Reputation: 922
Check with below command on what error it does shows.
httpd -t
Also Apache Error logs when it fails. Default path is.
/var/log/httpd/error_log
Upvotes: 1