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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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. |
|
|||
|
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! |