[TriLUG] Problems with webserver at home
Roy Vestal
rvestal at trilug.org
Wed Mar 12 09:52:46 EDT 2008
To answer Jeremy's previous question, only going from an internal client
to the internal server is slow. Going from inside to outside is not.
As for the /etc/hosts file suggestions:
I've tried this with the server's hostname for simplicity of editing
files with Quanta, internal sftp, ssh, etc, and it appears to work for
for the editing scenario.
One note: I do have Apache running multiple virtual hosts from this one
server.
So my followup question:
How would I go about adding the virtual hosts?
i.e.
10.0.0.1 firstsite.example.com # would be the first host I'm assuming
10.0.0.1 secondsite.example.com # wouldn't this bring up the first site?
I have adjusted my DocumentRoot to be the root of the server, NOT any
site. The hierarchy is as follows:
/www
./site1
./site2
./site3
Apache httpd.conf:
....
DocumentRoot /www
...
<VirtualHost *:80>
Servername firstsite.example.com:80
DocumentRoot "/www/site1"
</VirtualHost>
<VirtualHost *:80>
Servername secondsite.example.com:80
DocumentRoot "/www/site2"
</VirtualHost>
....
Again, from the outside, it works flawlessly, but from the inside, it's
slow.
Dave Sorenson wrote:
> Another kludge is to add the internal IP of your server to the hosts
> file on each machine on your network so the request never goes out to
> the wild. This must be the internal IP, not your external IP that the
> rest of the world gets.
> IE:
>
> 192.168.92.1 mywebserver.com
>
> Has worked for me in the past.
>
> Dave S.
>
> Jeremy Portzer wrote:
>
>> Roy Vestal wrote:
>>
>>
>>> Folks,
>>> I have a webserver at home running a couple of sites, one of which is
>>> running mambo. When I connect from outside my network (from work, or
>>> coffee shop, etc) works fine. When I connect from within my house, it
>>> takes 3-5 min to bring up a site. It seems the sights that have images
>>> take a little longer (which makes sense) so my mambo site takes almost 5
>>> min.
>>>
>>>
>>>
>> Do you mean that bringing up ANY Internet site, e.g. Google, Yahoo,
>> etc., is taking 3 to 5 minutes?
>>
>> Or only the sites that are on your local web server have the problem?
>>
>> I'm going to assume it's the latter, and that you're using a typical
>> home cable or DSL router device using port forwarding to connect to your
>> web server. If so, the IP address of your web site(s) that's in DNS is
>> going to be the external IP address, e.g. the one assigned by your ISP
>> through your cable/DSL modem. The actual IP address of the server is a
>> local IP address, in one of the private ranges such as 192.168.0.x.
>>
>>
More information about the TriLUG
mailing list