Re: Apache Virtual Server

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

 



On Mon, 2009-04-27 at 20:42 +0200, Uwe Kiewel wrote:
> I'm not sure how apache recognizes which virtual server the client
> requests. Maybe you need a real dns setup.

The hostname request is sent in the connection from the browser, the
webserver uses the first virtual host that matches the name.  So the
order that you specify hosts in is important if there's any double
matches.  The default will be used if none of the virtual hosts match.

I have virtual hosts configured as per your sample, plus a default one
like this:

<VirtualHost _default_:80>
  DocumentRoot    /var/www/html
</VirtualHost>

That just shows the usual Fedora + Apache, the webserver is working,
test page.

I found it easier to specify *all* websites as virtual hosts, with just
a blank dummy site in the default host (/var/www/html/).  And to avoid
someone being able to cross between sites inappropriately, none of them
are sub-directories inside /var/www/html/.  They all have separate
roots.

e.g. Default:  /var/www/html/
     example:  /var/www/example
     test:     /var/www/test

If you don't do that, and you don't want people to be able to access one
site through another, you need complex access limitation rules.

You need to have name and numerical IP address resolution agreeing with
each other on the server and any clients that connect.  That can be done
with their hosts files, or using a DNS server.  For anything more than
about two or three computers, it's easier to use one central DNS server.
Never again will you have to mess with any hosts file for any other
network or server configurations.  And, for some things, the hosts file
is inadequate.


-- 
[tim@localhost ~]$ uname -r
2.6.27.21-78.2.41.fc9.i686

Don't send private replies to my address, the mailbox is ignored.  I
read messages from the public lists.



-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux