How to access XAMPP from external address – HTTP and MySQL

Assuming that your internal firewall is open (this is not the right thing to do BTW). you can open a connection from any IP address to your XAMPP server.  This small tutorial will take you through the changes that you will need to do in order to be able to access XAMPP host and MySQL remotely.

for Apache go to the following line “c:\xampp\apache\conf\extra\httpd-xampp.conf” and do a search for “<LocationMatch”.  Once you find it, make a change to the “Deny from all” to have a # in front of it.  See code below.

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

Now the next thing is to fix MySQL
Once you find the “my.cnf/my.ini” file, open it up and find the line that has “[mysqld]”.  Under that set of line add skip-name-resolve.  This should fix the issue.  Note that once you enable this, you might have some issues if you are trying to login on MyPHPAdmin.  See code for example.

# The MySQL server
port= 3306
socket= "C:/xampp/mysql/mysql.sock"
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M

Apache Friends Support Forum • View topic – How to access XAMPP from external adress
XAMPP MySQL Server Remote Access
MySQL: Can’t get hostname for your address

6 thoughts on “How to access XAMPP from external address – HTTP and MySQL

  1. ahmed hassan

    you have to open a port of the service in you router then try you puplic ip out of your all network cause if you try it from your network , the puplic ip will always redirect you to your router but from the outside it will redirect to the server you have


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.