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: How to serve static content using apache server
Author
vikram115



Joined: 19 Jul 2015
Posts: 3
Location: India

PostPosted: Sun 19 Jul '15 22:27    Post subject: How to serve static content using apache server Reply with quote

Hello All,

I am new to apache and getting lot of trouble in serving static content from apache. I have a weblogic server and I am running an application from admin server. I need that all the static request like html file should be processed by apache server rather than going to application server. Could someone please let me know what I need to update in httpd conf file for getting this issue resolved.

Thanks
Vikram
Back to top
James Blond
Moderator


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

PostPosted: Mon 20 Jul '15 16:53    Post subject: Reply with quote

How did you configure the reverse proxy stuff to the backend server?
Back to top
vikram115



Joined: 19 Jul 2015
Posts: 3
Location: India

PostPosted: Mon 20 Jul '15 18:17    Post subject: Reply with quote

Sorry James. I am not much aware about this concept. However I have tried below piece of snippet in my httpd.conf directory.

Code:
LoadModule weblogic_module modules/mod_wl_22.so

<IfModule mod_weblogic.c>

##STANDALONE
WebLogicHost localhost
WebLogicPort 7001

MatchExpression /Calendar/
</IfModule>


So I have one Calendar.war file which consist of Calendar.html inside it. I have removed that htm file and put it inside C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/Calendar. However when i am accessing this application application and clicking the Calendar.html file its not able to find it. I want this html file to be search inside apache rather than going to application server. Please guide me.
Back to top
vikram115



Joined: 19 Jul 2015
Posts: 3
Location: India

PostPosted: Tue 21 Jul '15 16:33    Post subject: Reply with quote

I have made some below configuration changes which i think will skip to check all the static contents like html,png,jpg etc from application and should check it in apache server. However I am not sure how to server this purpose from apache server. What configuration changes do i need to make.

Code:

<Location /Calendar>
    SetHandler weblogic-handler
    WLExcludePathOrMimeType *.json,*.html,*.png,*.jpg,*.css,images/*.jpg   
</Location>
<IfModule mod_weblogic.c>
    WebLogicHost localhost
    WebLogicPort  7001
    HungServerRecoverSecs 3600
    ConnectTimeoutSecs 25
    ConnectRetrySecs 2
    Debug OFF
</IfModule>


For example if i search for http://loalhost:8080/Calendar/images/vik1.img it should search this images/vik1.img in apache server. Is there a way to achieve this.Do i need to put all the folders inside document root.
Back to top
James Blond
Moderator


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

PostPosted: Wed 22 Jul '15 11:50    Post subject: Reply with quote

I don't use weblogic. However you can also remove the handler

http://httpd.apache.org/docs/2.4/mod/mod_mime.html#removehandler
Back to top


Reply to topic   Topic: How to serve static content using apache server View previous topic :: View next topic
Post new topic   Forum Index -> Apache