Solved

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

Posted on 2011-03-12
1
332 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Exception thrown while starting tomcat on Mac OS 7 86
Read Config:: values from another file 2 91
Best IDE for PHP starters 11 123
Web Reply Form - PHP with Upload 4 69
As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
Upgrading Tomcat – There are a couple of methods to upgrade Tomcat is to use The Apache Installer is to download and unzip and run the services.bat remove|install Tomcat6 Because of the App that we are working with, we can only use Tomcat 6.…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
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…

777 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