1820882 Members
3566 Online
109628 Solutions
New Discussion юеВ

HPUX apache mod_rewrite

 
Jannik
Honored Contributor

HPUX apache mod_rewrite

I have apache installed as a standard version from hpux, I'm running on a rx1600 server. I have defined a reverse-proxy and that works witout problem but I want to rewrite the information but the rewrite does not work at all.
Not even the logfile is created...


DocumentRoot "/opt/hpws/apache/htdocs"
ServerName some.name.com
RewriteEngine on
RewriteLog logs/rewite-debug.log
RewriteLogLevel 5
RewriteRule ^(.*) /$1/test.html [L]

Options None
AllowOverride Authconfig
AuthName "Auth"
AuthType Basic
AuthUserFile conf/auth.passwd
require valid-user
SetEnv REMOTE_ADDR External

ProxyPass / http://131.1.1.2/
CustomLog logs/access_log_1 common


/sbin/init.d/hpws_apache stop
/sbin/init.d/hpws_apache start

How can i see if the rewrite_mod is installed, If i look into /opt/hpws/apache/modules I have a file called:
-r-xr-xr-x 1 bin bin 207512 Jul 23 2003 mod_rewrite.so
jaton
5 REPLIES 5
Florian Heigl (new acc)
Honored Contributor

Re: HPUX apache mod_rewrite

there ought to be an option to apachectl that lists the loaded modules. If that doesn't work, You can use the http://servername/server-info/ page (access must be enabled in httpd.conf first)
yesterday I stood at the edge. Today I'm one step ahead.
Jannik
Honored Contributor

Re: HPUX apache mod_rewrite

in httpd.conf:
LoadModule rewrite_module modules/mod_rewrite.so

So the module should be loaded. I have a problem connecting directly to the server all active ports pass though :-).
jaton
Jannik
Honored Contributor

Re: HPUX apache mod_rewrite

sollution is to - NOT using proxypass but redirect though RewriteRule... like this:
RewriteRule ^/(.*)$ http://131.1.1.2/$1?user=%{REMOTE_USER}&ip=%{REMOTE_ADDR} [P]
jaton
Steven E. Protter
Exalted Contributor

Re: HPUX apache mod_rewrite

I'm wondering what the goal is. Are you trying to get enhanced information on your users into a log?

Only for the page test.html?

Inquiring minds want to know.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jannik
Honored Contributor

Re: HPUX apache mod_rewrite

My goal was to get proxypass to work with rewriteengine, the information test.html was just to test it. What i needed was to pass the local information to the web site behind the firewall.
And it works like a dream... but thx for asking this is the string:
RewriteRule ^/(.*)$ http://131.1.1.2/$1?user=%{LA-U:REMOTE_USER}&ip=%{REMOTE_ADDR} [P,QSA]
when you are passed though the proxy the URI is attached with user and ip from the location information in the virtual server.
jaton