Solved

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

Posted on 2011-03-12
1
333 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 learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

839 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