Accessing your Local Web Server from a Mobile Device using XAMPP

If you are using XAMPP to do PHP development and you want to test your pages on your iPhone, you will need to:

  1. Find your local IP address
  2. Configure XAMPP to allow access from your mobile device (not necessary on Macs).

Find Your Local IP Address

Your local IP address will be something like

  • To find your local IP address on Windows, open a command prompt and type ipconfig. You’re looking for the IPv4 Address.
  • To find your local IP address on Mac, open Terminal and type ifconfig | grep "inet " | grep -v It will be be the first address after “inet”.

Once you know the IP address, on your mobile device, open a browser and point it to (change to use your IP address). If you’re using a Mac, that should work. If you’re using a PC, your likely to get a 403 error, like this one:403 Error: Access Forbidden. New XAMPP Security Concept.

Configure XAMPP to allow access from your mobile device

You may get a 403 error when you navigate to your Windows’ web server from your mobile device. If you do, you need to make a small change in the httpd-xampp.conf file:

  1. In the XAMPP Control Panel, next to Apache, click on the Config button and open httpd-xampp.conf:
  2. In the bottom of the file, change Require all local to Require all granted.
  3. Stop and Start Apache and then try loading the page in your mobile device’s browser. It should now display the XAMPP homepage.

Additional Resources

Related Training: PHP

About Webucator

Webucator provides instructor-led training to students throughout the US and Canada. We have trained over 90,000 students from over 16,000 organizations on technologies such as Microsoft ASP.NET, Microsoft Office, Azure, Windows, Java, Adobe, Python, SQL, JavaScript, Angular and much more. Check out our complete course catalog.