Re: Named Virtual Host not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ed Landaveri wrote:
My named virtual host (second one) is not working. Only the default responds.This is my httpd.conf:
...
<VirtualHost *:80>
  ServerName mysite.org
</VirtualHost>

<VirtualHost *:80>
  ServerName myothersite.net
</VirtualHost>

If the name requested by the client doesn't match one of your virtual hosts *exactly*, then the default will be used. That's probably the issue that you're running in to.

You probably want to use the ServerAlias directive to add names:

<VirtualHost *:80>
  ServerName myothersite.net
  ServerAlias myothersite.net *.myothersite.net
or:
  ServerAlias myothersite.net www.myothersite.net
</VirtualHost>


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux