0

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

6
  • I don't really get the problem. I can see the christabelle hotel website at chistabellehotel.com
    – etagenklo
    Apr 6, 2013 at 17:37
  • Typo. Of course I mean christabellehotel.com
    – etagenklo
    Apr 6, 2013 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..
    – glarkou
    Apr 6, 2013 at 19:09
  • Do you have the following in your httpd.conf before the virtualhost definitions? NameVirtualHost *:80
    – tdk2fe
    Apr 6, 2013 at 20:09
  • @tdk2fe yes. I have the that.
    – glarkou
    Apr 6, 2013 at 20:45

2 Answers 2

0

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

<VirtualHost 198.199.125.69:80>

5
  • Hello mate. It does not work again. Check christabellehotel.com
    – glarkou
    Apr 6, 2013 at 20:53
  • can you pastie your conf file?
    – tdk2fe
    Apr 6, 2013 at 21:14
  • pastebin.com/jFhVM9Yw
    – glarkou
    Apr 6, 2013 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, 2013 at 21:42
  • Doesn't work. Now the 198.199.125.69 goes to christabellehotel directory.
    – glarkou
    Apr 6, 2013 at 21:56
0

change NameVirtualHost *:80 to NameVirtualHost *

2
  • 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
    – glarkou
    Apr 10, 2013 at 17:28
  • because you have a _default_ setting. please update your question with your complete VirtualHosts configuration
    – Marcel
    Apr 10, 2013 at 21:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .