apache virtual hosts (windows)

apache virtual hosts (windows)

am 28.08.2007 12:28:10 von w33bster

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


DocumentRoot "C:\Program Files\Apache Group\Apache2\htdocs"
ServerName localhost



DocumentRoot "C:\Program Files\Apache Group\Apache2\htdocs
\mywebsite"
ServerName mywebsite.local


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.

Re: apache virtual hosts (windows)

am 28.08.2007 12:48:49 von unknown

Post removed (X-No-Archive: yes)

Re: apache virtual hosts (windows)

am 28.08.2007 13:20:46 von w33bster

On 28 Aug, 11:48, Davide Bianchi
wrote:
> On 2007-08-28, w33bs...@googlemail.com wrote:
>
> > I've set up my virtual hosts as follows
>
> > NameVirtualHost 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!