Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've subsonic application running of tomcat. Everything else works on apache. I don't want to write port number everytime so I'd like to set-up a simple directory where subsonic will be accessible.

So, I'm trying to make virtualhost file inside apache dir. (ubuntu server 12.04)

I tried many variations, but cannot make anything work:

<VirtualHost *:80>

 DocumentRoot /var/www/streamer

  ProxyPass               /       http://mini.local:4040/
  ProxyPassReverse        /       http://mini.local:4040/

</VirtualHost>
share|improve this question
    
What is in apache access and error log? What do you see in browser, when accessing the reverse proxy web? –  Kamil Šrot Nov 14 '12 at 18:41
    
@KamilŠrot I see nothing. As if nothing happens, I just see empty dir. –  Sandro Dzneladze Nov 14 '12 at 18:47
    
Make sure, you load mod_proxy and mod_proxy_http, check error.log –  Kamil Šrot Nov 14 '12 at 18:52
add comment

1 Answer

up vote 1 down vote accepted

What you are doing should already work. I do have similar setup where the tomcat is running 8080 and I dont want external URL(hence the end user should never know I am running it on 8080).

So I do is do proxypass similar to what you did and also use redirect match or redict permanent in case my internal URL changes. Example if I change from http to https and dont want to change the URL on the client APIs or other applications.

You should try to use the apache redirect module. It would allow you to internally redirect without modifying the external URL

Example:

<VirtualHost *:80>
  ServerName test.web.site
  Redirect permanent / http://another.site.port
</VirtualHost>

Above example will be addition to what you are already doing using ProxyPass.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.