Re: httpd.conf problem

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

 



On Sat, 23 Oct 2004 18:22:40 +0200, Bas Bosman <bas.narayan@xxxxxxxxx> wrote:
> Hello,
> 
> This probably is a stupid question but i did a reinstall of my server
> today and as of now my virtual server setting aren't good anymore.
> 
> I put back the old httpd.conf and the domain settings are still the
> same but it only displays 1 page.
> 
> the conf is:
> 
> # Use name-based virtual hosting.
> #
> #NameVirtualHost *:80
> #
> # NOTE: NameVirtualHost cannot be used without a port specifier
> # (e.g. :80) if mod_ssl is being used, due to the nature of the
> # SSL protocol.
> #
> 
> #
> # VirtualHost example:
> # Almost any Apache directive may go into a VirtualHost container.
> # The first VirtualHost section is used for requests without a known
> # server name.
> #
> #<VirtualHost *:80>
> #    ServerAdmin webmaster@xxxxxxxxxxxxxxxxxxxxxx
> #    DocumentRoot /www/docs/dummy-host.example.com
> #    ServerName dummy-host.example.com
> #    ErrorLog logs/dummy-host.example.com-error_log
> #    CustomLog logs/dummy-host.example.com-access_log common
> #</VirtualHost>
> 
> <VirtualHost *>
> DocumentRoot /online/forum/
> ServerName forum.lmv-clan.nl
> </VirtualHost>
> 
> <VirtualHost *>
> ServerAdmin bas@xxxxxxxxxxx
> DocumentRoot /online/lmv/
> ServerName lmv-clan.nl
> ServerAlias www.lmv-clan.nl
> </VirtualHost>
> 
> So now http://lmv-clan.nl delivers forum instead of the main site.
> does anyone knows what to do?
> 
> Bas
> 
> --
> fedora-list mailing list
> fedora-list@xxxxxxxxxx
> To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
> 
I'm not flaming here, but you may want to consider removing the
comment lines from your conf file in future posts.  Other than making
it more difficult to read, there are email servers out there that
would reject emails of 1024 lines or longer.

Anyhow, I had some issues with this recently, and they still aren't
completely resolved.  BUT, from what I've read, you need to specify
either differentiating Fully Qualified Domain Names (FQDNs), or IP
addresses in the <VirtualHost> directive.  I'm asuming that you system
oly has one NIC (and thus one IP), so you would most likeyl want to go
with FQDNs.

For example:

<VirtualHost forum.lmv-clan.nl:*>
DocumentRoot /online/forum/
ServerName forum.lmv-clan.nl
</VirtualHost>

<VirtualHost www.lmv-clan.nl:*>
ServerAdmin bas@xxxxxxxxxxx
DocumentRoot /online/lmv/
ServerName www.lmv-clan.nl
ServerAlias lmv-clan.nl
</VirtualHost>


Also, notice the change in the ServerName and ServerAlias directives. 
This will depend on what you are using for DNS resolution (internal v.
external DNS server).

HTH

-- 
Charlie Heselton
Network Security Engineer


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

  Powered by Linux