apache virtual hosts (windows)

This is a discussion on apache virtual hosts (windows) within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi, I've looked all over these groups and my head now hurts...I'm sure this has been answered ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-28-2007
w33bster@googlemail.com
 
Posts: n/a
Default 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.

  #2 (permalink)  
Old 08-28-2007
w33bster@googlemail.com
 
Posts: n/a
Default Re: apache virtual hosts (windows)

On 28 Aug, 11:48, Davide Bianchi <davideyeahs...@onlyforfun.net>
wrote:
> On 2007-08-28, w33bs...@googlemail.com <w33bs...@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!

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:35 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0