How do I access XAMPP host from another PC on my network?

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

How do I access XAMPP host from another PC on my network?

Postby celtic-fiddler » 01. July 2020 01:31

How do I install a website using XAMPP on a computer in my home network (inside a NAT), and access that site from another computer on my home network?

Or, in my case, I would like to install XAMPP 7.4.7 and a website on my Linux (Ubuntu 18.04.04 LTS) box, then access it from my Win10 box.
celtic-fiddler
 
Posts: 2
Joined: 30. June 2020 02:04
XAMPP version: 7.4.7
Operating System: Windows 10

Re: How do I access XAMPP host from another PC on my network

Postby celtic-fiddler » 03. August 2020 18:13

More than a month with no replies. I have to conclude one or more of the following is true
1) Nobody else has ever wanted to run XAMPP on an Ubuntu box and access that host from elsewhere on a local NAT network.
2) Nobody knows how to do this
3) There is something wrong with the way I posed the question.

Fortunately, I have some workarounds for running my tests. I have a domain that I'm not currently using for anything else, and I have hosting I can use for that. Perhaps less secure, and certainly less convenient than using XAMPP, but at least I can make some progress.
Sigh.
celtic-fiddler
 
Posts: 2
Joined: 30. June 2020 02:04
XAMPP version: 7.4.7
Operating System: Windows 10

Re: How do I access XAMPP host from another PC on my network

Postby JJ_Tagy » 03. August 2020 21:17

0 for 3 on that one. Most likely, no one that read it desired to respond.

Each computer on your network has an IP address. Set up your web server, and access it using the IP address (i.e. http://192.168.0.100/)
JJ_Tagy
 
Posts: 788
Joined: 30. January 2012 13:44
XAMPP version: 5.5.15
Operating System: Windows 10 Pro x64

Re: How do I access XAMPP host from another PC on my network

Postby WorstCases » 06. August 2020 12:13

Did you find your answer?

Reason is, that I am wondering the same.
I did find some information, but it was more confusing for me - so still looking.

Question in general is: Will XAMPP (and it's components) be open in the LAN right after installation, or do are changes necessary. Eg: Permissions to files/folder, or settings in a config file?

Currently I can not find the answer. ..


For example: To connect to phpmyadmin from outlide localhost, the following seems to be a necessary setting in the httpd-xampp.conf (from xampp Linux FAQ):

Within this file, find the lines below.


Alias /phpmyadmin "/opt/lampp/phpmyadmin/"
<Directory "/opt/lampp/phpmyadmin">
AllowOverride AuthConfig
Require local

Then replace 'Require local' with 'Require all granted'.


Alias /phpmyadmin "/opt/lampp/phpmyadmin/"
<Directory "/opt/lampp/phpMyAdmin">
AllowOverride AuthConfig
Require all granted


I wonder, if I do need to allw all (Require all granted), of if there is an option to only allow certain IP-range (eg. 192.168.x.x), or even pre-defined Ip-Adresses?
WorstCases
 
Posts: 12
Joined: 05. April 2010 11:49

Re: How do I access XAMPP host from another PC on my network

Postby Nobbie » 06. August 2020 13:43

WorstCases wrote:Question in general is: Will XAMPP (and it's components) be open in the LAN right after installation


Yes. (Actually you mean "Apache", not "XAMPP", as XAMPP is a name of a distribution). Apache is open to be accessed as shown by JJ_Tagy (see above). No need for any modification. Anyway, PhpMyAdmin is restricted to localhost for safety reasons. Of course you may change the configuration as you showed up, that allows access from everywhere.
Nobbie
 
Posts: 13176
Joined: 09. March 2008 13:04

Re: How do I access XAMPP host from another PC on my network

Postby WorstCases » 10. August 2020 20:19

Thank you.

I did the following, to make sure I don't open "too much" - even though this is just a local test environment:

Code: Select all
Require local
Require all granted
Require ip 192.168.111


I could not find an option to allow (as an example) 192.168.111.50-192.168.111.55

Is there an option I am missing?
WorstCases
 
Posts: 12
Joined: 05. April 2010 11:49

Re: How do I access XAMPP host from another PC on my network

Postby Altrea » 10. August 2020 21:01

Require all granted will allow requests from any source ip.
So if you don't want to open too much, this line should better not be there.
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: 11933
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: How do I access XAMPP host from another PC on my network

Postby WorstCases » 10. August 2020 22:43

Altrea wrote:Require all granted will allow requests from any source ip.
So if you don't want to open too much, this line should better not be there.


Totally correct. Thanks for the hint. Made a mistake, putting the code here. I was experimenting with the config, and this line remained there, but is actually commented-out.

Code: Select all
#Require all granted


So the code actually is like this:
Code: Select all
Require local
Require ip 192.168.111


Still would like to find out, if/how I can define an IP range (eg: 192.168.111.50-192.168.111.55)
WorstCases
 
Posts: 12
Joined: 05. April 2010 11:49

Re: How do I access XAMPP host from another PC on my network

Postby Altrea » 10. August 2020 23:01

WorstCases wrote:Still would like to find out, if/how I can define an IP range (eg: 192.168.111.50-192.168.111.55)

You cannot define ip ranges excet the range can be defined by a subnet, like you already did:
Code: Select all
Require ip 192.168.111

Will match all ips from 192.168.111.0 up to 192.168.111.255
and is the same as:
Code: Select all
Require ip 192.168.111.0/255.255.255.0
or
Code: Select all
Require ip 192.168.111.0/24


The nearest you can get to your ip range would be this:
Code: Select all
Require ip 192.168.111.48/29
which will contain IPs from 192.168.111.48 up to 192.168.111.55
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: 11933
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 25 guests