Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old February 12th, 2001, 02:35 PM
dcreelma dcreelma is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 4 dcreelma User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Cool

Hello,

I need to redirect using apache on a linux box to a development server IP address using a domain name that isn't registered to the IP. In other words when the redirect happens I need the development server to think that the domain name is URL, because I capture the domain name through an environmental variable. I can handle the redirect with no problem through apache but the domain name is not correct.

On my NT box I just change the host file and when I type URL in the browser everything works fine. I changed the hosts and lmhosts files on the linux box and they come up with the correct IP when I ping the fake domain name but the redirect still doesn't work.

Any ideas, did I totally explain that poorly?

Reply With Quote
  #2  
Old February 12th, 2001, 04:15 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>>using a domain name that isn't registered to the IP

Are you talking about internal web server with only internal request?

>>Any ideas, did I totally explain that poorly?

Yes, a bit.

Reply With Quote
  #3  
Old February 12th, 2001, 04:54 PM
dcreelma dcreelma is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 4 dcreelma User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Both web servers are on the net in two completely different locations.

I want the linux box to redirect to the ip of my development servers but with the domain name of my specification. So I could have two different domain names going to the same IP: URL, URL from my Linux box. The catch is neither of these domain names is registered to that ip.

As I said in my previous post I can accomplish this with my NT workstation by changing the host file so when I type URL or URL in my browser it will go to the IP of my designation and the site will recognize the domain name that was typed in(I assume it was in the http header). I was hoping I could do something similar with the Linux box but I can't seem to.

Don't know if this clears anything up.
Thanks for the help.


Reply With Quote
  #4  
Old February 12th, 2001, 07:06 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> I changed the hosts and lmhosts files on the linux box

Keep in mind, /etc/hosts is just your local resolver, it just work locally.

>> Both web servers are on the net in two completely different locations

Then you should check out mod_proxy and mod_rewrite.

Anyway, still not enough info.
1) What are the IPs (make them up) for your NT box and Linux box?
2) What is the forward nslookup for http://www.xyz.com and http://www.123.com?

>> I changed the hosts and lmhosts files on the linux box and they come up with the correct IP

Again, which correct IP?

>> when I ping the fake domain name

Which fake domain? BTW, how do you define fake domain in your case?

Reply With Quote
  #5  
Old February 13th, 2001, 08:08 AM
dcreelma dcreelma is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 4 dcreelma User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question

The short version:

I have an apache server on URL (123.45.67.890).
I have a development server on 001.02.03.004.

I set up in the URL hostfile a domain name URL fake domain name) and pointed it at the ip 001.02.03.004, I can ping URL and it shows a ping of 001.02.03.004. So I set up a redirect to URL, on the apache server at URL, using mod_alias hoping it would redirect a browser to the IP 001.02.03.004 with the URL URL in the browser's address box, it didn't.

How do I get apache to redirect a browser to the IP 001.02.03.04 with the domain name URL showing in the browser's address box? I see how to redirect in mod_rewrite but not how to accomplish what I need with the domain name showing in the browser's address box.

Reply With Quote
  #6  
Old February 13th, 2001, 10:07 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
As I said, /etc/hosts file is for local use, so it might work for you locally but not for others who try to reach your site. You need to run nameserver and you can't put whatever fake domain you like to /etc/hosts and expect it to work, yes locally, but not on the net.

Say you put 123.45.67.89 www.yahoo.com in /etc/hosts, that doesn't work because forward dns lookup of http://www.yahoo.com doesn't point to 123.45.67.89.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > Redirect to ip with appropriate URL?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway