apache virtual host problem

Ashley Benton meggalen at gmail.com
Tue Feb 5 12:57:37 UTC 2008


I don't have your last line in /etc/apache2/httpd.conf but I had in in
/etc/apache2/apache2.conf, Once I added the name of the sites that I wanted
enabled that worked on the computer which the files are in. I found that in
the middle of the night. But it didn't work on any other computers in my
network and told me that the requested URL /www... was not found on this
server. When I added your last line in /etc/apache2/httpd.conf and reload
apache it tells me that NameVirtualHost *:0 has no VirtualHosts so I guess
it doesn't need the line here since it is already somewhere else.
I will look later to try to find out how to redirect the URL.
Thank you for your help
Meg

On Feb 5, 2008 6:40 AM, Aart Koelewijn <aart at mtack.xs4all.nl> wrote:

> On Mon, 04 Feb 2008 16:47:24 -0500, Ashley Benton wrote:
>
> > I added the lines in /etc/hosts, so now when I try
> > http://theswebsite.com(secondwebsite)<http://theswebsite.com%28secondwebsite%29>on the computer that is the
> > server, it shows me my first
> > site, the same thing happen when I try http://www.linuxabcd.org. If
> > instead of http://www.linuxabcd.org I try file://www.linuxabcd.org, I
> > see my file system.
> >
> > When I try from the Windows computer I can find only the first site I
> > tried http://192.168.0.105, goes to the first website (seems logical to
> > me)
> > http://192.168.0.105/www.theswebsite.com the webpage cannot be found. It
> > does the same with file://192.168.0.105/www.theswebsite.
> >
> > I tried apache2 -S in the terminal and this is the result: VirtualHost
> > configuration:
> > wildcard NameVirtualHosts and_default_servers: *:*
> >           is a NameVirtualHost
> >        default server myfirstsite.com
> >        (etc/apache2/sites-enabled/mysite:2) port * namevhost
> >        myfirstsite.com(/etc/apache2/sites-enabled/mysite:2)
> > Syntax OK
> >
> > It apparently recognizes only one server name which is the name of the
> > first website.
> > Is there anything except writing name server and server alias in the
> > virtual host files that I should have done?
> > I have now 192.168.0.105 www.linuxabcd.org and
> > <http://www.linuxabcd.org/> 192.168.0.105 name.second.domain defined in
> > /etc/hosts Thank you
> > Meg
> >
>
> Dear Meg,
>
> I can't exactly follow what you have done, but I also have a apache2
> server with 2 virtual hosts running on one computer. I'll give you the
> bare essentials off my set-up, maybe that will help:
>
> In /etc/apache2/httpd.conf:
>
> Include /etc/apache2/sites-enabled/
>
> (this is the last line in that file)
>
> In /etc/apache2/sites-enabled/mtack.xs4all.nl
>
> NameVirtualHost *:80
> <VirtualHost *:80>
>        ServerAdmin aart at mtack.xs4all.nl
>        ServerName mtack.xs4all.nl
>        DocumentRoot /home/public
> </VirtualHost>
> <VirtualHost *:80>
>        ServerAdmin aart at energiekeuring.com
>        ServerName www.energiekeuring.com
>        DocumentRoot /home/energie
> </VirtualHost>
>
>        <Directory /home/public>
>                Options -FollowSymLinks +MultiViews
>                AllowOverride None
>                Order allow,deny
>                allow from all
>        </Directory>
>
>        <Directory /home/energie>
>                Options -FollowSymLinks +MultiViews
>                AllowOverride None
>                Order allow,deny
>                allow from all
>        </Directory>
>
> Both virtual servers are viewable from the computers in my home-network.
> I remember I had some problems with that with a previous server, which,
> as far as I can remember, I solved in the way I wrote before. Now I have
> a name-server running on this computer and as far as I can see, that is
> the only thing I needed. An other way is, to use a external proxy
> somewhere. Probably your ISP will have a proxy-server you can use.
>
> --
> Aart
>
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20080205/57120c28/attachment.html>


More information about the ubuntu-users mailing list