Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache local/remote
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
puggy
Bodhisattva
Bodhisattva


Joined: 28 Feb 2003
Posts: 1992
Location: Oxford, UK

PostPosted: Fri Jun 27, 2003 3:55 pm    Post subject: Apache local/remote Reply with quote

Can I get apache to respond differently to local users (192.168.0.X) than to remote users. Basically all I want to change is the servername as currently things only work either locally or remotely as the servername remotely has to be www.mydomain.com where locally it needs to be machinename.mydomain.com as www.mydomain.com resolves to my NAT router and as it tries to access it from the inside gets the routers config web page instead of the page located inside my network on my server.

Cheers.

Puggy
_________________
Where there's open source , there's a way.
Back to top
View user's profile Send private message
devon
l33t
l33t


Joined: 23 Jun 2003
Posts: 943

PostPosted: Fri Jun 27, 2003 5:06 pm    Post subject: Reply with quote

Would this not work?
Code:

NameVirtualHost *
<VirtualHost IP>
DocumentRoot /some/place
ServerName www.mydomain.com
options...
</VirtualHost>

<VirtualHost IP>
DocumentRoot /some/place
Servername machinename.mydomain.com
options...
</VirtualHost>
Back to top
View user's profile Send private message
puggy
Bodhisattva
Bodhisattva


Joined: 28 Feb 2003
Posts: 1992
Location: Oxford, UK

PostPosted: Fri Jun 27, 2003 5:11 pm    Post subject: Reply with quote

This looks more complicated than anything I've done in apache (not much) so far. I'll get back to you after I've done some RTFMing.

Cheers.
Puggy
_________________
Where there's open source , there's a way.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum