Intermittant connectivity over LAN with XAMPP

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

Intermittant connectivity over LAN with XAMPP

Postby sman789 » 31. May 2012 13:20

I have XAMPP installed on Ubuntu Desktop 12.04, and wish to be able to access it over LAN only. I can find the IP address of the Ubuntu computer, but when I enter it into a browser on another machine, I only manage to connect about once a minute. I have to keep pressing 'refresh' until my page loads.

I was wondering if anyone could help me with this. It obviously is working, as I do get the pages eventually, it just seems to be very random as to when I get them. Also it's not a load time issue, it actually fails to connect according to Firefox.

Accessing the pages on the computer itself with localhost is absolutely fine.

In addition, can I ask if others on the Internet can access the XAMPP pages? I only use it for private use of MediaWiki so don't really want it accessible on the internet. Thankyou
sman789
 
Posts: 8
Joined: 25. December 2010 21:57

Re: Intermittant connectivity over LAN with XAMPP

Postby JonB » 01. June 2012 18:22

A. Look in your Apache error log, and see if its logging errors.

B. See if tis only MediaWiki with the problem by using the either the XAMPP pages or some static HTML.

C. last but not least, your 'server' isn't connected via WiFi is it???

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

Re: Intermittant connectivity over LAN with XAMPP

Postby sman789 » 22. June 2012 13:58

Thanks for the reply.

Where might I find the apache error log? The LAMPP folder contains many log files and folders.

It's not only mediawiki - I've tried accessing normal files, folders and HTML pages and they all suffer from the same problem.

My computer is connected via WI-FI to a router which is connected to the internet. Luckily I have nothing in MediaWiki at the moment and XAMPP is hardly ever running - so I want to know how secure it is before I actually use it for anything important. :)
sman789
 
Posts: 8
Joined: 25. December 2010 21:57

Re: Intermittant connectivity over LAN with XAMPP

Postby JonB » 22. June 2012 15:51

The name and location of the Apache Error log is set in the main Apache config file - /opt/lampp/etc/httpd.conf .

Code: Select all
#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog logs/error_log



As for the 'intermittent' issue, try hard-wiring it temporarily to that router - if the problem goes away - ~tada~

Good Luck
8)



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

Re: Intermittant connectivity over LAN with XAMPP

Postby sman789 » 22. June 2012 19:41

Thanks - seems as though I get a lot of "unable to check htaccess file, ensure it is readable" errors when browsing folders, but I don't think that's the cause of the connection issue when using MediaWiki.

I don't seem to be able to reproduce the intermittent connectivity issue at the moment, which is strange because it was non-stop before. I'll have to have a play around with it for a while and determine the conditions under which is appears - but thankyou for your help anyway ;)

But could you answer my question about the internet access to the server? As I said, I use a wifi network behind a router, but only want access for computers in the network. Thanks
sman789
 
Posts: 8
Joined: 25. December 2010 21:57

Re: Intermittant connectivity over LAN with XAMPP

Postby JonB » 23. June 2012 12:15

A. - I suggest you check the mediawiki project's site on that issue with htaccess.

B. - I'm not sure you saw the part about XAMPP/LAMPP not being for production environments. The developers of the XAMPP suite intended it for use as a development platform (for programmers and designers). So, when they built it, they created an 'open' configuration. This was done deliberately, so developers wouldn't hit 'speed bumps' (problems to solve caused by hardening) when working. THUS - many potential 'ooopses' exist. But the use you propose is quite close to that. Its only when you 'open to the public' that it gets thorny.

C. - There is a basic fix available on the XAMPP Welcome Page under the topic 'Security'. It tells you how to run a XAMPP provided script that fixes the top issues.

D. - LAMPP is 'not' a true LAMP stack, so I suggest you read the bash script that powers lampp - its a file called 'opt/lampp/lampp'. A programmer's editor like geany that highlights syntax would make it more readable.

E. - If you are going to run it in an open as/is fashion, there's a page I wrote for the Windows version that discusses most of the issues, and they are basically the same for the Linux version: (includes a discussion about what is needed and what is not)

http://bravo.newnetenterprises.com/word ... -security/

F. - Contrary to what some might tell you and the popular notions on the 'internet', you actually have to 'know some things' about your sever to use it properly and securely. Not doing so, leaves you open to the 'oopses'. There are whole pages/sites about hardening PHP and Linux. That's what Google is for, I use it all the time to learn new skills, and I have been a systems engineer for 25+ years -- still learning.

Disclaimer: These are all just 'my ideas', and don't represent the XAMPP project. (although I suspect Oswald would agree).

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Intermittant connectivity over LAN with XAMPP

Postby sman789 » 23. June 2012 15:49

To be honest, the LAN connectivity issue doesn't bother me very much. It would be nice to be able to access it over LAN but I don't really mind if I have to use it locally - I just like to use MediaWiki on my own machine for my own purposes. So really I just want to make sure that no-one on the internet could accidentally or intentionally access the stuff I put on MediaWiki or in the htdocs folder. I've used the LAMPP security script, but the main thing I want to do is just make sure XAMPP doesn't talk to anybody but me.

Also the htaccess error was when browsing folders inside the htdocs folder, not when using MediaWiki. But it doesn't matter really because it's not something I need to use it for. As you can tell, I'm not a web development expert, I just want to close off my system from the outside world in the easiest manner possible. Is there not just a 'local only' setting somewhere which I can use?

Actually, I have an idea:

Ideal scenario: Perfect LAN and local access, no internet access at all
Still fairly happy: Local access only
Mustn't happen: Anyone on the internet can access my server

So is there an easy way to get to the situation in the first or second point? Sorry that my intended uses for XAMPP are totally not what it was made for, but if I can just make it local only with a few settings then I'd like to know how to do it.
sman789
 
Posts: 8
Joined: 25. December 2010 21:57

Re: Intermittant connectivity over LAN with XAMPP

Postby JonB » 23. June 2012 20:28

I guess you did not read my XAMMP security page as I suggested?

One reassuring thing to remember – if you don’t turn on ‘port forwarding’ or ‘DMZ” on your router and your computer does not connect directly to the Internet through a NIC (Network Interface Adapter) – there is little to zero risk involved in running XAMPP.


As long as YOU don't forward ports 80, 443 or 3306 on your router/internet connectors, no one on the outside can peer into your network.

That part has NOTHING to do with XAMPP/LAMPP, its an intentional design feature of 'inter-networking' having to do with "non-routable IP ranges" and was part of the design process for routers - routers set up local networks to use IP address ranges which ISP's and other carriers have agreed to basically discard - thus they are called 'private' or 'non-routable'.

http://en.wikipedia.org/wiki/IP_address

http://boards.straightdope.com/sdmb/sho ... p?t=509209

http://www.easydesksoftware.com/news/news28.htm

Good Luck with your project.
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: Intermittant connectivity over LAN with XAMPP

Postby sman789 » 23. June 2012 22:09

I'm sorry if I came accross as ignorant, I put the page in a new tab and forgot to go back to it. Very tired today.

But I'm confident now to use XAMPP for my projects, so thank you very much :)

I'll try what you suggest about comparing XAMPP over Wifi with XAMPP plugged into a router and see what works and what doesn't once I get my laptop next week.
sman789
 
Posts: 8
Joined: 25. December 2010 21:57

Re: Intermittant connectivity over LAN with XAMPP

Postby JonB » 23. June 2012 22:58

OK, Good Luck with XAMPP/LAMPP
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 2 guests