Gossamer Forum
Home : General : Perl Programming :

Apache on localhost

Quote Reply
Apache on localhost
I've got this to work before a few years back and now I can't remember what on earth you do.

I'm running Apache on my machine. The machine doesn't have an IP address, so I use loopback localhost.

What I'm trying to do is to set up sub-domains on this. I need to set up sub domains to test various sites I have on my local machine, without having to edit the conf files to point to a different web site root every time.

I can't remember if this can be done using localhost, or do you do it with port numbers on a localhost? Ie, one document root on port 80, another on 8080 etc.

Anyone got any ideas for me?

Cheers

Wil

- wil
Quote Reply
Re: [Wil] Apache on localhost In reply to
I set up a couple of vHosts in my httpd.conf and modified my hosts file with something like:
Code:
127.0.0.1 localhost # Current project
127.0.0.1 localhost2 # x2concepts.com
127.0.0.1 localhost3 # dev-null.net

It works great for me. This is on a windows 2k machine, btw.

Regards,
Charlie
Quote Reply
Re: [CP] Apache on localhost In reply to
Ah yeah, bingo! Forgot completly about the HOSTS file.

'doh!

- wil