Solved

How to get apache to serve files from one location, but send posts to another location

Posted on 2011-03-12
1
334 Views
Last Modified: 2013-12-02
Hello,

I have an apache web server, which serves files from my subversion repository, and proxies to my tomcat application server.

I would like, when a user gets a file, apache serves it directly, but if the user posts back a file to the sameUrl, to be able to send it Tomcat for processing.

I tried this:
<Location /doc>
      <LimitExcept POST>
            Allow from all
            ProxyPass http://localhost/svnLocal
      </LimitExcept>
      <Limit POST>
            Allow from all
            ProxyPass http://127.0.0.1:8080/myApp/servlet
      </Limit>
</Location>

Either proxy works well for me, but not both. It seems that gets and posts always end up being passed to the same server. I found this, http://stackoverflow.com/questions/4994803/apache-nginx-proxy-post-requests-to-remote-server-handle-options-requests-local, where someone found a similiar issue and resolved it with Nginx, but I do not want to give up on my apache  web server.

Anyone now how I could resolve this with standard apache configuration? Obviously, I could let all the requests go through to my tomcat server, then have tomcat performs http requests back to the webserver to serve the gets, but that would be horrendously inefficient!
0
Comment
Question by:GregoryCoburn
1 Comment
 

Accepted Solution

by:
GregoryCoburn earned 0 total points
ID: 35117993
Hello,

Seems I have cracked it myself. I describe the solution here!

Gregory

http://gregorycoburn.wordpress.com/2011/03/12/making-files-on-my-webserver-readwrite/
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Apache web application(s) as Service Provider - ADFS 2.0 as IDP 4 129
PHP Error Settings 12 86
apache vhosts on mac not being recognized 5 99
web project error add remove 1 49
In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
There are numerous questions about how to setup an IBM HTTP Server to be administered from WebSphere Application Server administrative console. I do hope this article will wrap things up and become a reference for this task. You need three things…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question