mercredi 4 mars 2015

URL Rewriting in Apache Web Server

I have an issue, I think most of the learned Apache Web Server engineers have encountered and can suggest a solution.


I am accessing my the appication like this: http://ift.tt/1Gmj02n. But I want to access the application only with http://ift.tt/1B9niWv i.e. I do not have to add the application name in the URL.


I have an Apache Web Server acting as a reverse-proxy and the application is hosted in Tomcat Server (It is an Hybris Application comes with its internal tcServer).


I have used the mod_jk to configure the set up. It looks like this:



JkWorkersFile /etc/httpd/conf/workers.properties

<VirtualHost *:80>
ServerName http://ift.tt/1B9niWv
JkMount /powerapp/* app1worker
RewriteEngine on
RewriteLog logs/apache-mod_rewrite
RewriteRule ^/(.*)$ /powerapp/$1 [L,PT]
</VirtualHost>


The workers.properties file has following entry:



worker.list=app1worker
worker.app1worker.type=ajp13
worker.app1worker.host=10.xxx.xxx.23
worker.app1worker.port=8009


The problem is with the above set up I am not able to get the page. I am being forced to add powerapp in the URL.


If I change JKMount as :



JkMount /* app1worker


I am getting the index page, but the css, jvascript files and images are not getting applied.


I am not sure how to go ahead. Any help will be appreciated.


Thanks,


Chandan





Aucun commentaire:

Enregistrer un commentaire