apache virtual hosts (windows)

Hi,

I've looked all over these groups and my head now hurts...I'm sure
this has been answered loads but I need it explained in an easy to
follow manner.

I've got apache 2 running on port 8080 (IIS is using 80)
I've set up my virtual hosts as follows

NameVirtualHost 127.0.0.1

<VirtualHost 127.0.0.1>
DocumentRoot "C:\Program Files\Apache Group\Apache2\htdocs"
ServerName localhost
</VirtualHost>

<VirtualHost 127.0.0.1>
DocumentRoot "C:\Program Files\Apache Group\Apache2\htdocs
\mywebsite"
ServerName mywebsite.local
</VirtualHost>

My Hosts file contains:

127.0.0.1 localhost
127.0.0.1 mywebsite.local

So I can access http://mywebsite.local:8080 on the same machine as the
webserver but how do I access it from a different machine on the same
network?

And...can I make the url just got straight to the right port without
the 8080?

And......is there a better way of setting up my virtual hosts?

Thanks in advance for any help.
w33bster [ Di, 28 August 2007 12:28 ] [ ID #1808816 ]

Re: apache virtual hosts (windows)

Post removed (X-No-Archive: yes)
Notifier Deamon [ Di, 28 August 2007 12:48 ] [ ID #1808817 ]

Re: apache virtual hosts (windows)

On 28 Aug, 11:48, Davide Bianchi <davideyeahs... [at] onlyforfun.net>
wrote:
> On 2007-08-28, w33bs... [at] googlemail.com <w33bs... [at] googlemail.com> wrote:
>
> > I've set up my virtual hosts as follows
>
> > NameVirtualHost 127.0.0.1
>
> ><VirtualHost 127.0.0.1>
>
> Do not use ip addresses, if you use IPs then Apache will only react
> on those IPs. Use '*' if you want it to respond to all the IPs.
>
> > So I can accesshttp://mywebsite.local:8080on the same machine as the
> > webserver but how do I access it from a different machine on the same
> > network?
>
> You need to have something, somewhere in your network that can "resolve"
> the domain name to your IP address (that is NOT 127.0.0.1), that 'something'
> can be a fully fledged DNS or another hosts file in that specific machine.
>
> > And...can I make the url just got straight to the right port without
> > the 8080?
>
> No.
>
> > And......is there a better way of setting up my virtual hosts?
>
> As said: remove the IPs from the configuration.
>
> NOTE: The default configuration/example DOES WORK.
>
> Davide
>
> --
> Madrid is a mathematical city of two halves: real and imaginary.
> --Verity Stob

thanks...that did the trick!
w33bster [ Di, 28 August 2007 13:20 ] [ ID #1808818 ]
Webserver » alt.apache.configuration » apache virtual hosts (windows)

Vorheriges Thema: webdav failing with "Failed to query lock-null status"
Nächstes Thema: Apache version