DenRaf's Blog

  • Contact

Contact
View Raf Nijskens's profile on LinkedIn
OpenSource
Linux
Powered by Drupal, an open source content management system
Get Firefox
Fosdem
Visit Inuits Technical home

Locations of visitors to this page

Tags in TagCloud

5 6 ADP1 Android apache automaticmenu caching cardreader cats Centos closed source cron Debian dell Dell R200 deploy Dream driver drupal drupalcron eclair Fosdem funambol mysql node_page O2Micro old openfire OpenID OSD otrs password trigger password_trigger plutado Ports presentation recover response header rpm script svn sync syncml tagadelic taxonomy terminal logging theme ubuntu update upgrade user filter user_import virt-manager wordpress wordpress 2.3 wp2drupal xmlsitemap zabbix zimbra Zimbra LDAP
more tags
Home

response header

response-header

Apache redirect response header

Submitted by DenRaf on Fri, 08/24/2007 - 22:08
  • [View]

All admins of advanced Apache setups will cross this problem someday. So did I :)

You have some nice reverse proxy setup, everything working just fine, except that one redirect that happens on one of the backend machines to a non default port.
You have no choice then redirect that to a default port. I searched long after this, and with me a collegue

Lets say when you surf to http://myhost.mydomain.com, you are proxied to backend server with ip 193.155.88.23. End for example that backend server redirects you to a non-default port like 8443. And you end up with your browser going to 193.155.88.23:8443 directly. If these ports aren't blocked already, you'll probably go to somewhere completely different.
Normal redirects are catched by your proxy and you'll not see a thing, but not these.

Everybody knows the mod_rewrite module, but that only handles request headers. For this you need to change to response headers. You could do this with some fancy stuff with something self written for using mod_perl or so, but the solution is by far more simplier.

mod_headers is the answer to this problem:

In your VirtualHost config for that machine on your proxy:

Header edit Location ^https://193.155.88.23:8443 https://myhost.mydomain.com

This will have as a result that the location header send by your backend server will be changed to https://myhost.mydomain.com if it starts with https://193.155.88.23:8443. Your browser directly go to https://myhost.mydomain.com and problem is solved.

  • DenRaf's blog
  • 1 comment
Tags:
  • SysAdmin
  • apache
  • edit
  • mod_headers
  • response header
Syndicate content

Guided search

Click a term to initiate a search.

Categories

  • drupal (26)
  • Linux (6)
  • SysAdmin (6)
  • Uncategorized (5)
  • Linux-tools (3)

Date authored

  • 2010 (5)
  • 2009 (10)
  • 2008 (27)
  • 2007 (11)

TagCloud

  • drupal (26)
  • Ports (7)
  • cron (6)
  • drupalcron (6)
  • 6 (3)
  • OSD (3)
  • zimbra (3)
  • cats (2)
  • Fosdem (2)
  • funambol (2)
  • more...

Recent blog posts

  • OSD2010: Day 2
  • OSD2010: Day 1
  • OSD2010: Pre notes
  • Howto: Android 2.1 on G1/ADP1/Dream
  • Updated look
  • Zimbra monitoring with zabbix
  • New module: Node Page Template
  • AutomaticMenu module for drupal 6
  • Drupal synchronisation
  • Imagefield_gallery module for drupal 6
more

Recent comments

  • I've installed it on my
    1 week 5 days ago
  • I am also having the same
    3 weeks 4 days ago
  • No Video
    4 weeks 1 day ago
  • Good, just finished the
    5 weeks 2 days ago
  • Screenshot Item Trigger
    5 weeks 4 days ago
  • You don't need 2 because
    10 weeks 3 days ago
  • Oracle plugin
    10 weeks 5 days ago
  • private serverlar
    10 weeks 5 days ago
  • Thanks much for providing
    11 weeks 12 hours ago
  • Templates give you a general
    11 weeks 2 days ago

Syndicate

Syndicate content
I love Smashing Magazine!
Fervens Drupal theme by Leow Kah Thong. Designed by Design Disease and brought to you by Smashing Magazine.