How to access XAMPP from external adress

Problems with the Linux version of XAMPP, questions, comments, and anything related.

How to access XAMPP from external adress

Postby madalin7 » 15. May 2009 18:02

Hi

I have ubuntu installed on my server and XAMPP 1.7. Everything works for localhost address I can access XAMPP but from exernal address(81.196.40.100/xampp) i'll get the folowing error message:

New XAMPP security concept:

Access to the requested directory is only available from the local network.

This setting can be configured in the file "httpd-xampp.conf".

here are the contents of 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 ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
81.196.40.94/32
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>


ifconfig
eth0 Link encap:Ethernet HWaddr 00:01:29:f1:d2:c4
inet addr:81.196.40.100 Bcast:81.196.40.127 Mask:255.255.255.192
inet6 addr: fe80::201:29ff:fef1:d2c4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:84631 errors:0 dropped:0 overruns:0 frame:0
TX packets:31805 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:34777299 (34.7 MB) TX bytes:6066076 (6.0 MB)
Interrupt:17 Base address:0xa000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2168 errors:0 dropped:0 overruns:0 frame:0
TX packets:2168 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:790484 (790.4 KB) TX bytes:790484 (790.4 KB)

if someone could help me.......10x
madalin7
 
Posts: 1
Joined: 15. May 2009 17:36

Re: How to access XAMPP from external adress

Postby jerrymannel » 27. May 2009 14:51

Try changing the <LocationMatch> section to

<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
#Deny from all
Allow from ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
fe80::/10 169.254.0.0/16

ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>

:). It worked for me ..
jerrymannel
 
Posts: 1
Joined: 27. May 2009 14:47
Location: Bangalore

Re: How to access XAMPP from external adress

Postby Eliminated » 16. August 2009 21:15

I just tried this, and it still doesn't work.

Please help me,

Thank's in advance,

James
Eliminated
 
Posts: 1
Joined: 16. August 2009 21:10

Re: How to access XAMPP from external adress

Postby ddobbins » 18. October 2009 20:40

Add your server IP address (may be your modem address from your ISP) to the section on "new security concept". I don't yet know what this syntax is, but this works for me. It seems more appropriate than allowing ALL.

Allow from ::1 127.0.0.0/8 \
::1 xxx.xxx.xxx.xxx/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
fe80::/10 169.254.0.0/16
ddobbins
 
Posts: 1
Joined: 04. February 2008 17:11

Re: How to access XAMPP from external adress

Postby Leonid Barinshteyn » 09. December 2009 20:04

it also works if you keep ip addresses on one line like this
Code: Select all
Allow from ::1 xxx.x.x.x/8 xx.xxx.xxx.xx/8 xx.xxx.xxx.xxx/8 \

try restarting apache after the adding new ips
Code: Select all
/opt/lampp/lampp restart
Leonid Barinshteyn
 
Posts: 1
Joined: 09. December 2009 20:00

Re: How to access XAMPP from external adress

Postby crazydrve » 27. December 2010 09:19

I couldnt get it to work either so one thing u could try which worked for me is comment out the whole section...

#
# New XAMPP security concept
#
#<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
# Order allow,deny
# #Deny from all
# Allow from ::1 127.0.0.0/8 \
# fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
# fe80::/10 169.254.0.0/16
#
# ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
#</LocationMatch>

not sure if this is safe tho...
crazydrve
 
Posts: 3
Joined: 07. August 2008 06:20

Re: How to access XAMPP from external adress

Postby Altrea » 27. December 2010 12:34

It's a really really bad idea to comment out the whole or parts of the xampp security concept just because you have not any knowledge about all the server components.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: How to access XAMPP from external adress

Postby xampp reply » 24. February 2011 12:52

hey crazydrve thanks man it true....but others ideas not working for me any way thanks all :P
xampp reply
 
Posts: 1
Joined: 24. February 2011 12:48

Re: How to access XAMPP from external adress

Postby destiny32 » 21. July 2011 21:22

just enter 127.0.0.1 and not your ip or 192.168.1.X or add into host file

127.0.0.1 [ ip which you want to acces ]
127.0.0.1 etc ..
destiny32
 
Posts: 1
Joined: 21. July 2011 21:19

Re: How to access XAMPP from external adress

Postby vvigneshbabu » 11. August 2011 06:38

It's work for me .Put # infront of Deny for all
Thank you for alll :o :lol:
vvigneshbabu
 
Posts: 1
Joined: 11. August 2011 06:34

Re: How to access XAMPP from external adress

Postby JonB » 14. September 2011 20:02

@ kg4bga

Other than the fact that this is a XAMMP on LINUX discussion - your points might actually have some value (although they are flawed on Windows also).

:roll:
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: How to access XAMPP from external adress

Postby bseitz234 » 11. October 2011 18:45

Hi-

Found this thread on Google- seem to be having issues with the same thing. I'd rather not comment out this security feature, because it seems like a good idea. I've got a VPN set up on my local network, and I'd like to be able to access phpMyAdmin remotely, but using the VPN for increased security. The network router is assigning 192.168.5.100-150, and the VPN server is assigning 192.168.5.224-225.

I've included the relevant section of httpd-xampp.conf below- any insights? I thought that allowing the 192.168.5.0/8 block would give me access, but it isn't working... Thanks in advance!

-Brian

~~~

from httpd-xampp.conf:

<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8 192.168.5.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
fe80::/10 169.254.0.0/16

ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>
bseitz234
 
Posts: 2
Joined: 11. October 2011 18:38

Re: How to access XAMPP from external adress

Postby Sharley » 11. October 2011 19:23

Hello Brian,

The CIDR for your range of IP addresses
192.168.5.100 - 192.168.5.150
and
192.168.5.224 - 192.168.5.225
is
192.168.0.0/16
65536 IP addresses.

Which is covered in the default settings.

So no need to add anything and best to remove your addition back to the default.
Save the file and restart Apache.

Now you need to look elsewhere for the solution as to why you can't connect from the VPN on your LAN - perhaps DNS or some router setting - with that aspect I can't help but others who read this may be able to.

Good luck. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: How to access XAMPP from external adress

Postby bseitz234 » 11. October 2011 19:30

Thanks Sharley! I thought that was the case, but hoped being more specific might help it. I'm getting the 403 error that's specified, rather than a 404, so I know I'm getting the right machine; just can't figure out where the permissions error is coming from...
bseitz234
 
Posts: 2
Joined: 11. October 2011 18:38


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 38 guests