[dundee] Apache2 VirtualHosts setup... Any help?

Marcel Hecko marcel at shmu.org.uk
Wed Jul 29 23:11:53 UTC 2009


The hostname (labs.localhost) needs to resolve to a IP address - the
/etc/hosts file does exactly that , but only locally, so don't expect it
to work on any other box than on the local host (or you have to point the
hostname to a remote IP address in the /etc/hosts file on that box where
you want to access the website from; or set-up a DNS record for that
hostname). :) After the connection is made to the IP address the HTTP
protocol asks HTTPd for the particular website (labs.localhost).

Marcel

<quote who="christopher wyllie">
> Thankyou you have the exact answer ! :-D
> That's wonderful, cheers. Can you explain why this needs done because
> nothing I've read anywhere mentioned it :-\
> Thanks,
>   Chris
>
> 2009/7/29 Andrzej Hajto <tlug at defcon1.eu>
>
>> Maybe adding 127.0.0.1 labs.localhost in   /etc/hosts will help.
>>
>> On Wed, Jul 29, 2009 at 10:52 PM, christopher
>> wyllie<cgwyllie at googlemail.com> wrote:
>> > Hello,
>> > I am currently trying to set up a virtual host on my localhost server.
>> I
>> > have tried several times but so far no luck. The page I've been
>> following
>> > just now is this: http://www.debian-administration.org/articles/412
>> > I'm running Debian Etch with Apache 2.2.3. I setup the
>> "NameVirtualHost
>> *"
>> > as shown at the link I posted. I have the "default" virtual host file
>> in
>> > sites-available and symlinked to the sites-enabled. Then, I've created
>> a
>> > "labs.localhost" file and enabled it too. It simply has a different
>> > ServerName and DocumentRoot.
>> > Apache restarts no problem but when I try to visit "
>> http://labs.localhost" I
>> > get a "could not locate remote server" error in the browser...
>> > Has anyone got any ideas on how to fix this? Is it a DNS issue or
>> similar?
>> > It would be useful for me to have virtualhosts but I can't seem to get
>> it
>> > working :-(
>> > Thanks for reading,
>> >   Chris
>> > P.S. Included site config files...
>> > _______________________________________________
>> > dundee GNU/Linux Users Group mailing list
>> > dundee at lists.lug.org.uk  http://dundeelug.org.uk
>> > https://mailman.lug.org.uk/mailman/listinfo/dundee
>> > Chat on IRC, #tlug on irc.lug.org.uk
>> >
>>
>> _______________________________________________
>> dundee GNU/Linux Users Group mailing list
>> dundee at lists.lug.org.uk  http://dundeelug.org.uk
>> https://mailman.lug.org.uk/mailman/listinfo/dundee
>> Chat on IRC, #tlug on irc.lug.org.uk
>>
> _______________________________________________
> dundee GNU/Linux Users Group mailing list
> dundee at lists.lug.org.uk  http://dundeelug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/dundee
> Chat on IRC, #tlug on irc.lug.org.uk


please reply to
marcel at shmu.org.uk

Marcel Hecko
Connected SHMU Development Worker
Station House Media Unit
Station Road, Woodside,
Aberdeen  AB24 2WB
Tel - 01224 487174



www.shmu.org.uk

listen to our community radio station live at www.shmufm.net

---------------------------------------------------------------------------------------
This message is not intended to have contractual effect
---------------------------------------------------------------------------------------

Save a tree -  don't print this e-mail or any attachment unless absolutely
necessary.




More information about the dundee mailing list