Solved

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

Posted on 2011-03-12
1
331 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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
IPv6 Networking 6 90
eror when calling procedure in java adf 4 56
Problem to Eclipse 16 98
linux apache localhost dev laptop 5 30
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now