You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Simon Taylor <se...@nortel.com> on 2005/09/29 22:07:29 UTC

[users@httpd] Alias And Redirection question

I am experiencing odd behaviour on our prod box when what i want to
happen works on our dev box.
What we are trying to achieve is to hit the index.html in the root of a
virtual host and have that file redirect the browser to another page - a
jsp - and then after that page it should redirect to a web page in the
root of the virtual host.
 
The problem we have is that we cant reference the file that we should be
redirected to after the jsp - because the browser makes a request that
is prefixed with the alias to arsys63 (see below).
 
47.211.64.105 - - [29/Sep/2005:19:27:11 +0100] "POST
/arsys63/servlet/LoginServlet HTTP/1.1" 302 - "
http://enmc-remedy/arsys63/shared/login.jsp?goto=/remedy_main.html"
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR
1.1.4322)"
47.211.64.105 - - [29/Sep/2005:19:27:11 +0100] "GET
/arsys63/remedy_main.html HTTP/1.1" 404 1494 "
http://enmc-remedy/arsys63/shared/login.jsp?goto=/remedy_main.html"
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR
1.1.4322)"

 
In dev we managed to get around this using relative urls for the goto -
like this:-
 
<meta http-equiv="refresh" content="0;
URL=/arsys63/shared/login.jsp?goto=../../remedy_main.html">
 
But when we try this on prod we get this in the apache log:-
 
47.211.64.105 - - [29/Sep/2005:20:58:32 +0100] "GET / HTTP/1.1" 304 -
"-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR
1.1.4322)"
And then nothing further and a Cannot find server in the browser.
 
Dev is using mod_jk2 and prod mod_jk - and prod is using pre-compiled
xampp install.
 
The html request isnt being passed to tomcat since its not showing in
the mod_jk logs
 
I'm sure i must be missing something simple
 
Configuration Details
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------
 
On production the set up is as follows:-
 
The virtual host def looks like:-
 
<VirtualHost *:80>
     DocumentRoot "/opt/xampp/htdocs/www-remedy"
     ServerName enmc-remedy
     ErrorLog "|/usr/local/sbin/cronolog
/opt/xampp/logs/%Y/%m/%d/error_remedy.log"
     LogLevel Debug
     RewriteLog "/opt/xampp/logs/rewrite.log"
     RewriteLogLevel 9
     CustomLog "|/usr/local/sbin/cronolog
/opt/xampp/logs/%Y/%m/%d/remedy_access.log" combined
     ScriptAlias /cgi-bin/ "/opt/xampp/htdocs/www-remedy/cgi-bin/"
     Alias /arsys63 "/opt/tomcat/webapps/arsys63"
     Alias /root "/opt/xampp/htdocs/www-remedy"
     <Directory "/opt/xampp/htdocs/www-remedy">
        Options FollowSymLinks Indexes Includes
        Order deny,allow
        Allow from all
     </Directory>
     <Location />
        Order deny,allow
        Allow from all
     </Location>
</VirtualHost>

The static html files live in 
/opt/xampp/htdocs/www-remedy
 
The redirect information in index.html looks like:-
 
<html>^M
<head>^M
<meta http-equiv="refresh" content="0;
URL=/arsys63/shared/login.jsp?goto=/remedy_main.html">^M
<meta name="keywords" content="automatic redirection">^M
</head>^M
<body>^M
</body>^M
</html>

Config:-
Thu Sep 29 18:50:40 2005
Apache/2.0.52 (Unix) DAV/2 mod_jk/1.2.6 mod_ssl/2.0.52 OpenSSL/0.9.7d
PHP/5.0.4-dev 
 
Connected to tomcat 5.5.9 with a default configuration
 
Apache JK Directives:-
 
JkWorkersFile     /opt/xampp/etc/workers.properties
JkLogFile         /opt/xampp/logs/mod_jk.log
JkLogLevel        debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkRequestLogFormat     "%w %V %T %q %r"
#JkAutoAlias     /opt/tomcat/webapps
JkMount          /arsys63/*.jsp ajp13w
JkMount          /arsys63/*.css ajp13w
JkMount          /arsys63/servlet/* ajp13w
JkMount          /arsys63/resources/* ajp13w
JkMount          /arsys63/BackChannel/* ajp13w
JkMount          /arsys63/forms/* ajp13w
JkMount          /arsys63/apps/* ajp13w


 
 
 

Simon Taylor
Service Tools Solutions (STS) Engineer
Nortel 
Email set@nortel.com
Office  +44.1628.617291 (ESN 6 861 7291)
Mobile +44.7740.533743 (ESN 748 3743)


 

 

 

Re: [users@httpd] Alias And Redirection question

Posted by Joshua Slive <js...@gmail.com>.
On 9/29/05, Simon Taylor <se...@nortel.com> wrote:
>
> I am experiencing  odd behaviour on our prod box when what i want to happen works on our dev  box.

Sorry, but this problem description is too difficult to parse for me
(and apparently others, given the general lack of response).

Just for example, looking at the following:

> In dev we managed to  get around this using relative urls for the goto - like  this:-
>
> <meta  http-equiv="refresh" content="0;  URL=/arsys63/shared/login.jsp?goto=../../remedy_main.html">
>
> But when we try this  on prod we get this in the apache log:-
>
> 47.211.64.105 - -  [29/Sep/2005:20:58:32 +0100] "GET / HTTP/1.1" 304 - "-" "Mozilla/4.0  (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR  1.1.4322)"

This log entry couldn't possibly be returned by the above URL.  There
must be other things going on that you haven't explained clearly.

I also don't understand why you need this double-redirect at all.  Why
not just redirect to the proper final location.

Joshua.

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org