Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 13th March 2005, 10:39 PM
user11 Offline
Registered User
 
Join Date: Jan 2005
Posts: 36
Different DocumentRoots depending on external/internal request

Hello,
I have apache 2 installed on my fedora box. I want to use two different document roots. One for people in my network (internal IP request) and one for external ones.

I have read about virtual hosts and tried to configure it many times, but I can't seem to make it work.

Does anyone know how to do this? And tell me what IP addresses to use?

Thanks in advance.
Reply With Quote
  #2  
Old 14th March 2005, 05:18 AM
Jman Offline
Registered User
 
Join Date: Mar 2004
Location: Minnesota, USA
Age: 27
Posts: 7,909
To do IP based virtual hosting your server would have to have two IPs.

Maybe you can do name based virtual hosts if you have an internal DNS server. http://example.com gives the external one, but from the inside http://example results in the internal site.

There is a config tool for this, system-config-httpd.
Reply With Quote
  #3  
Old 14th March 2005, 09:31 AM
james_in_denver Offline
Registered User
 
Join Date: Oct 2004
Posts: 1,227
Pretty sure you can use "mod_rewrite" to take action based on the requesting client's IP address....

It's been a while since I played with it, let me "refresh" my memory (no pun intended??) on that, and I'll get back to ya.
__________________
Only dead fish go with the flow....

Hmmm, what did I miss?
Reply With Quote
  #4  
Old 14th March 2005, 06:57 PM
james_in_denver Offline
Registered User
 
Join Date: Oct 2004
Posts: 1,227
yes, mod_rewrite can do exactly what you want, but learning the syntax and structure is not trivial. However it is probably the most powerful and flexible module for Apache.

Here are a few examples of what it can do.
http://httpd.apache.org/docs/misc/rewriteguide.html
__________________
Only dead fish go with the flow....

Hmmm, what did I miss?
Reply With Quote
  #5  
Old 14th March 2005, 07:42 PM
user11 Offline
Registered User
 
Join Date: Jan 2005
Posts: 36
I'll look into it right away.
Thanks a lot.

Last edited by user11; 14th March 2005 at 07:58 PM.
Reply With Quote
Reply

Tags
depending, documentroots, external or internal, request

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Redirecting http request to internal web server MacUsers Servers & Networking 25 3rd September 2008 05:48 PM
external / internal sorta mjr Hardware & Laptops 3 12th December 2006 03:06 AM
External USB - slower than internal IDE? kilolima Hardware & Laptops 11 18th July 2006 06:06 AM
brwsing using the internal IP not the External IP wshamroukh Servers & Networking 2 11th February 2005 10:23 PM


Current GMT-time: 20:23 (Wednesday, 19-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat