views:

26

answers:

1

Hi

I am running XAMPP 1.7.3 on windows 7. My problem is that when I try to access my server (localhost) from another computer, the server does not respond. For example, [on my computer] when I type in 'http://localhost', my pages come up. However, when I try accessing 'http://192.168.0.102' from my computer, nothing happens. When I type in my external IP, nothing shows up, but when add HTTPS to the external IP, my Linksys WRT54GS config page shows up, asking for a password. I have already tried port forwarding and a local "static IP", and no luck, other than my local IP never changing. Can anyone help me?

A: 

Here's how I have my XAMPP installation configured. Maybe it will work for you.

  1. Open C:\xampp\apache\conf\extra\httpd-vhosts.conf

  2. Add a VirtualHost block for each site you are running:

    < VirtualHost *:80>

    ServerAdmin webmaster@localhost

    DocumentRoot C:/path/to/website/files

    ServerName exampledomain.dev

    < Directory "C:/path/to/website/files"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny Allow from all < /Directory> < /VirtualHost>

  3. Add a line to your hosts file (C:\WINDOWS\system32\drivers\etc\hosts) on the host computer:

    127.0.0.1 exampledomain.dev

  4. On the connecting computer's host file:

    192.168.0.102 exampledomain.dev

Chris Fletcher
I had to add a space after each < character, because the code formatting wouldn't work. You'll probably have to remove those spaces for the config to work.
Chris Fletcher