Search code examples
wordpressxamppipod-touchlanresolve

Connect to XAMPP webapp over LAN with iPodTouch


XAMPP 1.7.4 is hosted on a Win7 Pro system

A webapp located C:\xampp\htdocs\webapp\ is a single index.html file.

I can connect to the site locally like this http://localhost/webapp/

An iPodTouch is able to connect to the host over LAN entering the following in the safari browser:

http://192.168.0.11/

which resolves to

http://192.168.0.11/xampp/

and loads the xampp landing page.

But if I attempt to contact a webapp like this:

http://192.168.0.11/webapp/

the address resolves to http://localhost/webapp/ and the browser cannot open the page because it could not connect to the server.

http://192.168.0.11:80/webapp/ also produces the above result. I don't think entering the port is necessary anyway since I can reach the xampp landing page in the first example.

All of the above were performed with the following in place:

httpd.conf includes:

AllowOverride All
Order allow,deny
Allow from all

httpd-xampp.conf includes:

# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
#Deny from all
#Allow from 127.0.0.0/8
Allow from all
ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>

.htaccess for the webapp includes:

Order deny,allow
Allow from all

Presumably there is issue with the resolution of the webapp address getting thrown in to a loop on account of localhost.

How can I force http://192.168.0.11/webapp/ to load accross the lan ?


Solution

  • So the short story is I only need to modify xampp's default installation here:

    httpd-xampp.conf

    # New XAMPP security concept
    #
    <LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
    Order deny,allow
    #Deny from all
    #Allow from 127.0.0.0/8
    Allow from all
    ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
    </LocationMatch>
    

    to allow the access from any IP

    and to modify wp-admin > settings > general

    WordPress Address (URL) 192.168.01.11/webapp/ Site Address (URL) 192.168.01.11/webapp/

    and finally

    clear the browser cache !

    I had spent hours making modifications without being able to see the changes because of the browser's cache.

    no modification required to httpd.conf, httpd-vhosts.conf, .htaccess or any hosts file