LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-19-2006, 10:10 PM   #1
cyngallery
LQ Newbie
 
Registered: Feb 2006
Posts: 6

Rep: Reputation: 0
SLOW Accessing Home Web Server on LAN


I can't access my home server with any kind of tolerable speed from my computer that resides not four feet away. ARGH...

My LAMP server has been running nicely now for a few months. I don't think this has much to do with this, but for the sake of completion, here is my setup:

P4 1.3ghz
640 MB ram
40gig
CentOS-4
apache 1.3.36
php-4.4.2
mysql-5.0.22

I'm lucky enough to have a static IP, but my ISP blocks my server on port 80 so I've got it on 5000, FYI.

Anyway, I'm behind the same router as my server, and when I try to access anywhere on my site, it absolutely crawls. It DOES work, but only in the technical sense of the word. I go over to my friend's place and its remarkably fast in comparison. Its pretty annoying, but not entirely unexpected.

I had read something that routers (And mines just the basic LAN/WAN router) can't operate in full duplex, which would make sense of why it works better from another IP.

Does anybody have any insight into this or some suggestions to fix this?
If you've got anything to share it would be greatly appreciated.
 
Old 07-19-2006, 10:57 PM   #2
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 117Reputation: 117
Are you trying to connect to your static (external) IP? or to the LAN IP of the webserver? The first one does cause some weird TCP behavior behind a router, that I could explain in detail if you'd like.
 
Old 07-19-2006, 11:52 PM   #3
cyngallery
LQ Newbie
 
Registered: Feb 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Both, and I'm sorry I forgot to mention that I'd done that. BUT you got me to look into it again, and it seems as if it WANTS to work, but it also wants me to pull my hair out.

I'm not quite sure how to describe it, so let me run thru it like this:
What is fast: I hit up 192.168.0.3:5000/06art/ drops me into a directory full of 600k-sized images that load like, awesome man.

What isn't fast: it seems like my server keeps wanting to forward me thru my domain name, and its not just dynamic content either i.e., if I put 192.168.0.3:5000/06art instead of 192.168.0.3:5000/06art/ I get forwarded and the very same content downloads like butt.

So, I can't figure out how access mambo without being forwarded through my domain. (wth?)

If you've got anything on this, I'll worship you. Also, I would actually like to hear about TCP cos' I'm just that kind of guy, but it sounds like it'll be bit lengthy tho so you can spare your fingers if you like.
 
Old 07-25-2006, 09:10 PM   #4
cyngallery
LQ Newbie
 
Registered: Feb 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Pweeze?

F5F5F5F5F5F5F5F5 Bump

Sorry, this is really blowing my mind, and I can't get this to stop behaving like this. I can't think of anything to check in apache, and I believe that might be a part of the problem.

Any mystical insights?
 
Old 07-25-2006, 09:29 PM   #5
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 117Reputation: 117
Well, you're basically describing typical Apache behavior, but I honestly don't know how to fix it. I've encountered it on my own machines before. One thing you could try is putting the hostname of the apache server in your /etc/hosts file.
 
Old 07-25-2006, 09:51 PM   #6
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Testing my memory here big time, but can you have a look at your httpd.conf and see if you are loading the mod_dir module. If not have a look at the apache doumentation for mod_dir

Last edited by billymayday; 07-25-2006 at 09:57 PM.
 
Old 07-25-2006, 09:56 PM   #7
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Having a look around, if you are aliasing, maybe this helps

Quote:
Why does accessing directories only work when I include the trailing "/" (e.g., http://foo.domain.com/~user/) but not when I omit it (e.g., http://foo.domain.com/~user)?

When you access a directory without a trailing "/", Apache needs to send what is called a redirect to the client to tell it to add the trailing slash. If it did not do so, relative URLs would not work properly. When it sends the redirect, it needs to know the name of the server so that it can include it in the redirect. There are two ways for Apache to find this out; either it can guess, or you can tell it. If your DNS is configured correctly, it can normally guess without any problems. If it is not, however, then you need to tell it.

Add a ServerName directive to the config file to tell it what the domain name of the server is.

The other thing that can occasionally cause this symptom is a misunderstanding of the Alias directive, resulting in an alias working with a trailing slash, and not without one. The Alias directive is very literal, and aliases what you tell it to. Consider the following example:

Alias /example/ /home/www/example/


The above directive creates an alias for URLs starting with /example/, but does not alias URLs starting with /example. That is to say, a URL such as http://servername.com/example/ will get the desired content, but a URL such as http://servername.com/example will result in a "file not found" error.

The following Alias, on the other hand, will work for both cases:

Alias /example /home/www/example
From apache doc.s FAQ
 
Old 07-26-2006, 01:12 AM   #8
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,192

Rep: Reputation: 101Reputation: 101
It sounds to me like you need switch off UseCanonicalName.
In httpd.conf find the option
Code:
UseCanonicalName
and make sure its argument is 'off'.

http://httpd.apache.org/docs/2.2/mod...ecanonicalname
 
Old 07-26-2006, 01:15 AM   #9
cyngallery
LQ Newbie
 
Registered: Feb 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Intriguing

This all does makes sense. I'm running late tonight but I'll be working on this tomorrow for damn sure, and will be back with results (of some sort). Thanks, you guys are awesome, and I wholeheartedly apologize for my stupid bump. But thanks again.

Last edited by cyngallery; 08-19-2006 at 05:40 PM.
 
Old 08-19-2006, 09:15 PM   #10
cyngallery
LQ Newbie
 
Registered: Feb 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Sorry to have been the n00b to never reply, I do appreciate the responses.
Its taken some time to get around to, but I have taken a look into everything thats been mentioned here, to no avail.

Whoever may stumble upon this however, I think I've found at least some solution for this, in running another instance of apache bound to a different port that utilizes the exact same assets. This way when I access 192.168.0.3, I'll only remain on the connection to the IP in my network, bypassing anything that so much as references the domain.

Supposedly this is how it will work. I'll be working on this during the week and I'll document my findings, because surely (hopefully) I'm not the only one thats plagued by this.
 
  


Reply

Tags
home, lan, server


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing web server by the domain name technician Linux - Networking 6 12-01-2004 02:21 PM
Accessing Web Server over Internet lawadm1 Linux - Software 4 08-04-2004 07:51 PM
Slow accessing RedHat server files Steve1445 Red Hat 1 04-06-2004 03:12 PM
Slow link between home lan disinformation Linux - Networking 3 02-09-2004 02:11 PM
Can't access Linux web server web pages from LAN client jaydave Linux - Networking 4 03-16-2003 02:38 AM


All times are GMT -5. The time now is 12:07 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration