Re: Dyndns and apache

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

 



On Mon, 2005-08-22 at 09:33, Tim wrote:

> > I've set up Apache and it works fine. Problem is this though. If I point
> > the browser to http://ctadirect.homedns.org I get the Fedora testpage
> > and the logs say that I don't have access to /var/www/html. If I
> > add /cta onto the end, I get the site I should get without that
> > addition.
> > 
> > My apache.conf file looks like this
> >
> > ServerName 127.0.0.1:80
> 
> That's an odd thing to do.  Not sure if it'll do any harm, though.  And
> I seem to recall that you can just leave it out, for the server to work
> out the servername itself.

If you are using name based virtual hosts the global ServerName setting
will never be used.


> > # Use name-based virtual hosting.
> > #
> > NameVirtualHost 82.42.51.231:80
> > 
> > <VirtualHost ctadirect.homedns.org:80>
> >    ServerAdmin paul@xxxxxxxxxxxxxxxxxxxxxx
> >    DocumentRoot /var/www/html/cta/
> >    ServerName ctadirect.homedns.org   
> >    ErrorLog logs/cta-error_log
> >    CustomLog logs/cta-access_log common
> > </VirtualHost>
> 
> What I understand is that in the <VirtualHost IPaddress:Port> opening
> clause, the IP address and port are what the server is listening to for
> connections.  If you put a DNS address in there, the server will have to
> be able to resolve it to an IP.  Can it?  Are the names resolving
> locally?

There are several pieces that all have to tie together.  First you
have to tell apache what addresses/ports to listen on in the global
section.  Then you say that connections accepted on some or all
of these address/port combinations are should also check the
host header for named virtual hosts by using one or more
NameVirtualHost entries.  Then you tie a specific virtual host
to the address/port combination(s) permitted for it by specifying
the same address/port in the VirtualHost tag as you did in the
corresponding NameVirtualHost entry.  Then you specify the names
accepted for that VirtualHost entry in the enclosed ServerName and
ServerAlias tags.  If none of the names match, you get the first
VirtualHost entry for the address(s)/port(s) that match the
inbound connection, or if none of the NameVirtualHost entries
cover that address/port you get either a virtualhost specifically
bound to that combination, or if none exists, you get the global
site. 

-- 
  Les Mikesell
   lesmikesell@xxxxxxxxx



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

  Powered by Linux