Page 1 of 1

Can't access Xampp site through LAN [SOLVED]

PostPosted: 23. January 2011 03:44
by Ikonn
Hi, I can't access XAMPP via LAN... here's what I need:

MACHINE 1 (server): Running XAMPP. When I enter local.mysite.com, it works perfectly, showing the site!

MACHINE 2 (laptop): When I enter local.mysite.com... it shows me the page "XAMPP for Windows" and I want to display the site and not the XAMPP Page

My configuration so far:

MACHINE 1 (server):

http-vhosts.config
Code: Select all
NameVirtualHost 127.0.0.1:80

<VirtualHost 127.0.0.1:80>
  DocumentRoot D:/Webserver/
  ServerName localhost
</VirtualHost>

<VirtualHost local.mysite.com>
  DocumentRoot "D:/Webserver/drupal"
  ServerName local.mysite.com

  CustomLog "D:/Webserver/mysite.com/logs/local.mysite.com.access.log" combined
  ErrorLog "D:/Webserver/mysite.com/logs/local.mysite.com.error.log"

  <Directory "D:/Webserver/drupal">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>


Windows hosts file:
Code: Select all
127.0.0.1       localhost
::1             localhost
127.0.0.1      local.mysite.com



MACHINE 2 laptop:
Windows hosts file:
Code: Select all
192.168.1.23      local.mysite.com



I've been trying for hours. I must be missing something. Can someone help?

Thank you very much!

Re: Can't access Xampp site through LAN

PostPosted: 23. January 2011 07:03
by Sharley
Try removing the 127.0.0.1 from the equation as that is the local loop back address only
Code: Select all
NameVirtualHost 127.0.0.1:80

<VirtualHost 127.0.0.1:80>
Change to have Apache use a wild card address like so
Code: Select all
NameVirtualHost *:80

<VirtualHost *:80>
  DocumentRoot "D:/Webserver"
  ServerName localhost
</VirtualHost>

<VirtualHost *:80>
  DocumentRoot "D:/Webserver/drupal"
  ServerName local.mysite.com
  <Directory "D:/Webserver/drupal">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
  </Directory>
  CustomLog "D:/Webserver/mysite.com/logs/local.mysite.com.access.log" combined
  ErrorLog "D:/Webserver/mysite.com/logs/local.mysite.com.error.log"
</VirtualHost>


Good luck and best wishes.

Re: Can't access Xampp site through LAN

PostPosted: 23. January 2011 12:54
by Ikonn
Thanks Sharley, that did it!

I messed around with so many apache settings, I was getting a bit mad about it!!!

Once again, thank you... you saved my day!