Re: Unwanted rewrite followup/continuationn

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks, I'll consider those, perhaps one or more will be doable. Although I wouldn't say I am expecting Apache to understand my network, I'm just expecting it to leave the URL I enter alone, i.e., if I type http://1.2.3.4/something in the address bar, I want that to STAY http://1.2.3.4/something, and if I click a relative link (not absolute) to /somethingelse, it should then be http://1.2.3.4/ somethingelse. As things stand, Apache for some reason decides to change the 1.2.3.4, even though the link clicked doesn't affect that portion of the address. I want to turn off this rewriting of the URL- just leave it alone, as entered. If I understand what you are saying, though, this is not possible- Apache will always rewrite the URL. If so, I'l deal with it, but I'd rather not have to :)

If it helps any, the exact setup (and the reason for the whole conundrum) is the following:

We have the server set up on our internal network, with an given inside-only routable IP, let's call it 10.10.10.10. This internal network has DNS set up on, so all the machines inside can be accessed from inside by name rather than ip. So inside our network I can access this machine either by ip or hostname, and if apache rewrites the ip to the hostname, no bigie, since it is in DNS as well. Now certain people in our company have a need to access this server from outside our network. For this purpose I have set up a 1-1 NAT to translate the internal IP of this server into our external IP space- call it 12.13.14.15. I want to keep security on the server as tight as possible, however, so I don't want to "advertise" the fact that there is a server at 12.13.14.15 via DNS (minor issue, I know, but humor me) Therefore, to access this machine from outside our network one would need to enter the ip 12.13.14.15. When apache then changes that to the hostname, it of course is no longer accessible, and the user gets an error. If I set the ServerName directive to 12.13.14.15, then I get an error when trying to access the machine from inside the network. If Apache would just leave the entered URL alone, only changing the relative part when a link is clicked (unless, of course, it is an absolute link), then it would work fine.
-----------------------------------------------
Israel Brewster
Computer Support Technician
Frontier Flying Service INC.
5245 Airport Industrial Rd
Fairbanks, AK 99709
-----------------------------------------------


On Jan 10, 2007, at 2:01 PM, Mark Lavi wrote:

Forgive me if I don't understand, but it sounds like you are expecting
Apache (which is your network end point) to understand your network
routing and deal with it all by itself.

I don't believe that reasonable without incorporating your network into
the solution. Perhaps you should consider:

- Adding IPs to your Apache webserver, adjusting your network routing
and/or DNS, then make a virtual host respond to each IP and set
serveralias as you wish.

- Feed Apache additional information in order to trigger some
functionality you need (cookie the users per segment, give them
different DNS aliases to your web server, use rewrite rules to leverage
cookies, etc).

- Setting up local network segment http proxies to your Apache web
server to insulate people from your network routing.

- Combining the above into some sort of solution.

Those are ideas, I probably can't help further.

--Mark
Mark Lavi, Enterprise Web Management Team @ SGI
mailto:mlavi@xxxxxxx || phone:+1-650-933-7707

-----Original Message-----
From: Israel Brewster [mailto:israel@xxxxxxxxxxxxxxxxxx]
Sent: Wednesday, January 10, 2007 12:51 PM
To: users@xxxxxxxxxxxxxxxx
Subject: Re:  Unwanted rewrite followup/continuationn

Unfortunately, that won't work: the IP is different depending on
where the machine is being accessed from. So as long as Apache
insists on changing the URL to the server name, I will always have
issues- it will just change depending on what I use for the server name.

-----------------------------------------------
Israel Brewster
Computer Support Technician
Frontier Flying Service INC.
5245 Airport Industrial Rd
Fairbanks, AK 99709
-----------------------------------------------


On Jan 10, 2007, at 10:13 AM, Mark Lavi wrote:

Try changing the servername directive to the IP address in
httpd.conf, I
believe that will work.

E.g.:

<VirtualHost *:80>
 ServerName 127.0.0.1
# etc
</VirtualHost>

--Mark
Mark Lavi, Enterprise Web Management Team @ SGI
mailto:mlavi@xxxxxxx || phone:+1-650-933-7707

-----Original Message-----
From: Israel Brewster [mailto:israel@xxxxxxxxxxxxxxxxxx]
Sent: Wednesday, January 10, 2007 9:00 AM
To: users@xxxxxxxxxxxxxxxx
Subject:  Unwanted rewrite followup/continuationn

Ok, so I have managed to work around the problem below by putting the
hostname of the Apache server in the /etc/hosts file on the machines
that need to access the server by IP, so when it changes the IP to
the hostname the client can still find the server. This, however,
feels like a kludgy workaround, and wouldn't be feasible if we had
more than a couple machines that needed to access this server via ip.
Is there any way to convince Apache to NOT change the IP inn the URL
to the hostname? Thanks for any assistance that can be provided.

-----------------------------------------------
Israel Brewster
Computer Support Technician
Frontier Flying Service INC.
5245 Airport Industrial Rd
Fairbanks, AK 99709
-----------------------------------------------


On Jan 8, 2007, at 9:55 AM, Israel Brewster wrote:

I am running into a somewhat annoying problem with Apache 1.3.29 on
an OpenBSD 4.0 box. When attempting to access the server via IP
address, it loads the first page fine, but after clicking a link to
another page it rewrites the IP address in the URL to the hostname
of the machine. This promptly results in a "server not found"
error, as the hostname of the machine is not in DNS. How can I get
appache to leave the URL alone? The config of this server is mostly
still the default, aside from some authorization directives. Due to
the network setup, simply setting the ServerName directive to the
IP won't work, the problem there being that the IP the machine is
accessed at is different depending on if you are accessing it from
inside our network or outside. Actually, inside our network our
internal DNS is set up so you can access the server by the
hostname, but outside you need to use the IP (we don't want to make
this server easy to find). Thank you for any assistance you can
provide.
-----------------------------------------------
Israel Brewster
Computer Support Technician
Frontier Flying Service INC.
5245 Airport Industrial Rd
Fairbanks, AK 99709
-----------------------------------------------



-------------------------------------------------------------------- -
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux