|
Home > Archive > WebSphere Application Server > November 2005 > split static pages to IHS alias, with same URI
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
split static pages to IHS alias, with same URI
|
|
|
| I have a web application, but I want to move the static stuff (lots of GIFs and JPEGs)
to a static server.
My current setup is IHS (plugin-cfg.xml) --> WAS 5.1 (WAR containing /myapp)
plugin-cfg.xml contains entries to forward requests to WAS.
Works fine.
I move the static stuff to /opt/static/myapp and
I add this to httpd.conf
Alias /myapp /opt/static/myapp
<Directory /opt/static/myapp>
</Directory>
When I restart IHS, all my static stuff works fine, but none of the dynamic stuff from WAS won't, I get 404.
Can I have a dynamic WAR and a static alias with the same URI?
I have turned off fileserving in my WAR app.
It seems that the IHS Alias has precedence over everything in /myapp.
Basically I want WAS to handle everything that's not found in static/myapp, and IHS everything else.
I've turned on tracing in plugin-cfg, but I get no log lines for /myapp, unless
I comment out the Alias in httpd.conf.
The only way out is to change the links in /myapp to point to a new webroot /myappstatic,
but I want to avoid this.
Any tips?
/Thomas
| |
| Ken Hygh 2005-11-17, 6:20 pm |
| thomas.olausson@ficoh.com wrote:
>I have a web application, but I want to move the static stuff (lots of GIFs and JPEGs)
>to a static server.
>
>My current setup is IHS (plugin-cfg.xml) --> WAS 5.1 (WAR containing /myapp)
>plugin-cfg.xml contains entries to forward requests to WAS.
>Works fine.
>
>I move the static stuff to /opt/static/myapp and
>I add this to httpd.conf
>Alias /myapp /opt/static/myapp
><Directory /opt/static/myapp>
></Directory>
>
>When I restart IHS, all my static stuff works fine, but none of the dynamic stuff from WAS won't, I get 404.
>
>Can I have a dynamic WAR and a static alias with the same URI?
>I have turned off fileserving in my WAR app.
>
>It seems that the IHS Alias has precedence over everything in /myapp.
>Basically I want WAS to handle everything that's not found in static/myapp, and IHS everything else.
>
>I've turned on tracing in plugin-cfg, but I get no log lines for /myapp, unless
>I comment out the Alias in httpd.conf.
>
>The only way out is to change the links in /myapp to point to a new webroot /myappstatic,
>but I want to avoid this.
>
>Any tips?
>/Thomas
>
>
I'm guessing that the context root of your web application is /myapp.
When you create that alias in IHS, you changed /myapp/... requests to
/opt/static/myapp/..., and WAS doesn't handle that URL.
Try creating an alias for /static/myapp instead of /myapp
Ken
|
|
|
|
|