Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

dynamic virtualhost w/jsp (jserv) issue

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Server-side image editing  
Author Message
dime0000

External


Since: Sep 08, 2003
Posts: 10



(Msg. 1) Posted: Fri Sep 12, 2003 11:49 am
Post subject: dynamic virtualhost w/jsp (jserv) issue
Archived from groups: alt>apache>configuration (more info?)

hey there - i'm hoping this is simple...
I'm having an issue with one line vs. another. The commented out
rewrite rule is the one that compiles my index.jsp just fine, using
Jserv. If i use the uncommented rewrite rule that I WANT to use below,
to get the subdomain that the user requested, the index.jsp displays
uncompiled, in simple html format.
As always - any and all help is greatly appreciated.

<VirtualHost 172.18.4.13:80>
ServerName ics3dv1ws1.hq.bradgroup
ServerAlias *.ics3dv1ws1.hq.bradgroup
VirtualDocumentRoot /devl/ics3/devl/webroot/oc4j/ct/web
DirectoryIndex index.jsp

RewriteEngine on
#RewriteRule ^/(.*\.jsp) http://172.18.4.13:7778/ct/$1 [P]
RewriteRule (.*)\.ics3dv1ws1\.hq\.bradgroup/ct/(.*\.jsp)
http://172.18.4.13:7778/ct/$2?subdomain=$1 [P]
</VirtualHost>

 >> Stay informed about: dynamic virtualhost w/jsp (jserv) issue 
Back to top
Login to vote
dime0000

External


Since: Sep 08, 2003
Posts: 10



(Msg. 2) Posted: Mon Sep 15, 2003 12:35 pm
Post subject: Re: dynamic virtualhost w/jsp (jserv) issue [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Incase anyone's curious, i found the solution.. Followed below is a
great way to set up your VirtualHost to accept subdomains dynamically,
and push the subomain that the user requested to the URL (in my case,
to take java actions depending on the subdomain). Also, i added the
referring URL (HTTP_REFERER) so i can take action on that as well, to
the forwarding url. the final page in this case will be
<a style='text-decoration: underline;' href="http://172.18.4.13:7778/ct/index.jsp?subdomain=xxx&refer=xxx" target="_blank">http://172.18.4.13:7778/ct/index.jsp?subdomain=xxx&refer=xxx</a>

<VirtualHost 172.18.4.13:80>
ServerName ics3dv1ws1.hq.bradgroup
ServerAlias *.ics3dv1ws1.hq.bradgroup
VirtualDocumentRoot /devl/ics3/devl/webroot/oc4j/ct/web
DirectoryIndex index.jsp

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(.+)\.ics3dv1ws1\.hq\.bradgroup$
RewriteRule ^/(.*\.jsp)
<a style='text-decoration: underline;' href="http://172.18.4.13:7778/ct/$1?subdomain=%1&refer=" target="_blank">http://172.18.4.13:7778/ct/$1?subdomain=%1&refer=</a>{HTTP_REFERER} [P]
</VirtualHost>

dime0000.RemoveThis@yahoo.com (Larry S) wrote in message news:<8fd7acb0.0309120749.4c3becff.RemoveThis@posting.google.com>...
 > hey there - i'm hoping this is simple...
 > I'm having an issue with one line vs. another. The commented out
 > rewrite rule is the one that compiles my index.jsp just fine, using
 > Jserv. If i use the uncommented rewrite rule that I WANT to use below,
 > to get the subdomain that the user requested, the index.jsp displays
 > uncompiled, in simple html format.
 > As always - any and all help is greatly appreciated.
 >
 > <VirtualHost 172.18.4.13:80>
 > ServerName ics3dv1ws1.hq.bradgroup
 > ServerAlias *.ics3dv1ws1.hq.bradgroup
 > VirtualDocumentRoot /devl/ics3/devl/webroot/oc4j/ct/web
 > DirectoryIndex index.jsp
 >
 > RewriteEngine on
 > #RewriteRule ^/(.*\.jsp) <a style='text-decoration: underline;' href="http://172.18.4.13:7778/ct/$1" target="_blank">http://172.18.4.13:7778/ct/$1</a> [P]
 > RewriteRule (.*)\.ics3dv1ws1\.hq\.bradgroup/ct/(.*\.jsp)
 > <a style='text-decoration: underline;' href="http://172.18.4.13:7778/ct/$2?subdomain=$1" target="_blank">http://172.18.4.13:7778/ct/$2?subdomain=$1</a> [P]
 > </VirtualHost><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: dynamic virtualhost w/jsp (jserv) issue 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
how to run JSP using Jserv under Apache? - hello. i'm working on an issue, where we want our index.jsp (the first page that shows up on our site) to ACT like a JSP page. Currently, it only acts as an html page. I've done alot of research in the past few days, and I'm hoping that someone could hel...

Setenv with a dynamic variable - Hi all, I would like to use Setenv directive like this : SetEnv USER_AUTH ${SSL_CLIENT_S_DN_Email} but the result is "${SSL_CLIENT_S_DN_Email}" (with phpinfo) and not the email. Can someone help me ? Thanks!

Apache 2.0 caching dynamic scripts? - I'm writing some dynamic Ruby scripts that are run using the fastCGI module. I'm having a weird problem that I recall experiencing with PHP scripts as well. It only happens for me in Apache 2.0. It appears that Apache itself is caching the scripts....

Issue with url rewriting - Hi, I trying to do something in using the mod_rewrite. So, my first test was to create a page "trouve.html" and put a .htaccess file with " Options +FollowSymlinks RewriteEngine on RewriteRule ^nexistepas.html$ trouve.html [L] " Wh...

CGI issue when returning to index.html - I have a slight issue with my website. Most of the pages are generated by Perl and they all function correctly apart from when someone logs off. When a user clicks the logoff button, the page just goes blank instead of loading index.html (frame page..
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]