logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: New Apache User Banging Head on Wall, cannot retrieve static
Author
goose38



Joined: 21 Oct 2011
Posts: 2

PostPosted: Fri 21 Oct '11 23:04    Post subject: New Apache User Banging Head on Wall, cannot retrieve static Reply with quote

Dear All,

I'm trying to get working what I guess is a simple solution.

I have Apache WebServer and Oracle WLS Server 10.3.4, they are on separate boxers.

The Apache server is up and running as it gives the ItWorks message and also I can run the app connecting to the Apache server and it correctly sends the request to the WLS Server and sends back the response.

I now want to move one step futher and that is only let the dynamic requests go through to the application server and let Apache serve up the static html and gifs (so I can get higher through-put on the application server WLS).

So I have the Weblogic module located in Apache and also have loaded the module, my problem is I try and include something like the following

Listen 11.11.11.222:8080
LoadModule weblogic_module modules/mod_wl_22.so

<IfModule mod_weblogic.c>

##STANDALONE
WebLogicHost 11.11.11.223
WebLogicPort 7001

MatchExpression /test-web/
</IfModule>

DocumentRoot "/u10/apache/htdocs"

in the htdocs directory on apache if I include a directory called "test-web" and inside it I include a file called hello.html, when I try and hit the URL it cannot be seen and the request just gets sent to the main application server and fails, BUT if I add a directory in apache htdocs called new-web and within this include hello.html then if I hit the URL using the context root new-web it works.

the problem I seem to have is that I thought that I could have a match that forwards on but it would check the local htdocs assets first and if it existed would server it from there, OTHERWISE it would forward it onto the application server?

Have I misunderstood how it works or got something wrong in the config,

Many Thanks
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7355
Location: Germany, Next to Hamburg

PostPosted: Tue 25 Oct '11 9:48    Post subject: Reply with quote

The static content must be on a different path than the MatchExpression from weblogic. Cause all within that url will be send to the web logic server. Don't create a folder in your file system on the server where apache is running with the name of the application path you "mounted".

So you structure on the apache host might be

/u10/apache/htdocs
/u10/apache/htdocs/images
/u10/apache/htdocs/downloads
/u10/apache/htdocs/...

Code:

<IfModule mod_weblogic.c>

##STANDALONE
WebLogicHost 11.11.11.223
WebLogicPort 7001

MatchExpression /application/
</IfModule>


In this case application must not exist in /u10/apache/htdocs/

Of cause you have to change src path of the images and other static content in your application like

Code:

src="/images/whatever.png"


If you still have a question please ask again.
Back to top
goose38



Joined: 21 Oct 2011
Posts: 2

PostPosted: Tue 25 Oct '11 10:55    Post subject: Reply with quote

thanks for that, hmm I'm not able to change the application at the moment which may cause an issue.

I'd thought that Apache could provide intelligent processing and check for the static etc in the same context root on apache and if it was not there then forward the request to the application server.

thanks for explaining that I will check to see how the URL's of the static's are made up in the application, I had done some sample with test folders on apache and been able to pull back the static.

what I do not understand is how the example on the middleware magic site works as they put the matching as

http://middlewaremagic.com/weblogic/?m=201005&paged=2

<IfModule mod_weblogic.c>
WebLogicCluster MS1HostName:7003,MS2HostName:7005
MatchExpression /*
</IfModule>

which would mean ALL (*/) content comes from the application server no matter what you had on Apache, what am I missing
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7355
Location: Germany, Next to Hamburg

PostPosted: Tue 25 Oct '11 11:12    Post subject: Reply with quote

Ok, from the tutorial the web logic module for apache is kinda intelligent.
If some content exist on apache is prefers to deliver that instead asking the web logic backend server.

That is how I understand that tutorial. So that module / plugin is kinda different to native apache modules.

I have no web logic server to test that.
Back to top


Reply to topic   Topic: New Apache User Banging Head on Wall, cannot retrieve static View previous topic :: View next topic
Post new topic   Forum Index -> Apache