Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am using Centos6.3 and I have configure apache using the Slicehost tutorial.

My configuration is the following:

<VirtualHost *:80>
    ServerName christabellehotel.com
    ServerAlias www.christabellehotel.com
    DirectoryIndex index.php
    DocumentRoot /home/sites/christabellehotel.com
    LogLevel warn
    ErrorLog /home/sites/christabellehotel.com/error.log
    CustomLog /home/sites/christabellehotel.com/access.log combined
</VirtualHost>
<VirtualHost *:80>
    ServerName akteabeach.com
    ServerAlias www.akteabeach.com
    DirectoryIndex index.php
    DocumentRoot /home/sites/akteabeach.com
    LogLevel warn
    ErrorLog /home/sites/akteabeach.com/error.log
    CustomLog /home/sites/akteabeach.com/access.log combined
</VirtualHost>
<VirtualHost *:80>
    ServerName 198.199.125.69
    DirectoryIndex index.php
    DocumentRoot /home/sites/
    LogLevel warn
    ErrorLog /home/sites/error.log
    CustomLog /home/sites/access.log combined
</VirtualHost>

The problem is that when I open http://christabellehotel.com/ I cannot see tha virtual host which I configure and which is the following: http://198.199.125.69/christabellehotel.com

Helpful information:

# /usr/sbin/httpd -S

VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
_default_:443          198.199.125.69 (/etc/httpd/conf.d/ssl.conf:74)
*:80                   is a NameVirtualHost
     default server christabellehotel.com (/etc/httpd/conf/httpd.conf:1023)
     port 80 namevhost christabellehotel.com (/etc/httpd/conf/httpd.conf:1023)
             alias www.christabellehotel.com
     port 80 namevhost akteabeach.com (/etc/httpd/conf/httpd.conf:1034)
             alias www.akteabeach.com
     port 80 namevhost 198.199.125.69 (/etc/httpd/conf/httpd.conf:1044)

Syntax OK

share|improve this question
    
I don't really get the problem. I can see the christabelle hotel website at chistabellehotel.com –  etagenklo Apr 6 '13 at 17:37
    
Typo. Of course I mean christabellehotel.com –  etagenklo Apr 6 '13 at 17:44
    
@etagenklo I just removed the last virtual host but the problem is that I cannot enter the server by ip address in order to test websites without a domain. But at least the website works.. –  salamis Apr 6 '13 at 19:09
    
Do you have the following in your httpd.conf before the virtualhost definitions? NameVirtualHost *:80 –  tdk2fe Apr 6 '13 at 20:09
    
@tdk2fe yes. I have the that. –  salamis Apr 6 '13 at 20:45
show 1 more comment

2 Answers

take the third virtualhost entry, move it to the top, and change the directive to

<VirtualHost 198.199.125.69:80>

share|improve this answer
    
Hello mate. It does not work again. Check christabellehotel.com –  salamis Apr 6 '13 at 20:53
    
can you pastie your conf file? –  tdk2fe Apr 6 '13 at 21:14
    
pastebin.com/jFhVM9Yw –  salamis Apr 6 '13 at 21:31
    
Try This. Also - be sure to reload the httpd daemon... i've wasted hours before b/c I forgot to do it after I modified the config :) –  tdk2fe Apr 6 '13 at 21:42
    
Doesn't work. Now the 198.199.125.69 goes to christabellehotel directory. –  salamis Apr 6 '13 at 21:56
add comment

change NameVirtualHost *:80 to NameVirtualHost *

share|improve this answer
    
Starting httpd: [Wed Apr 10 17:28:14 2013] [error] VirtualHost :80 -- mixing * ports and non- ports with a NameVirtualHost address is not supported, proceeding with undefined results [Wed Apr 10 17:28:14 2013] [error] VirtualHost :80 -- mixing * ports and non- ports with a NameVirtualHost address is not supported, proceeding with undefined results [Wed Apr 10 17:28:14 2013] [error] VirtualHost default:443 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results –  salamis Apr 10 '13 at 17:28
    
because you have a _default_ setting. please update your question with your complete VirtualHosts configuration –  Marcel Apr 10 '13 at 21:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.