I've set up Apache2 on a small home server and I'm trying to get Transmission running through it. I've got it working just fine, but I'm having an issue where the redirect I've set up for the transmission vhost is also working on the main site. This will make it impossible to host any other web app at the main site. Here's my http-vhosts.conf file that includes the redirect:

NameVirtualHost *:80
<VirtualHost *:80>
    ServerName transmission.blah.fakedns.com
    ServerAlias transmission.blah.fakedns.com

    ProxyRequests Off

    ProxyPass /transmission http://127.0.0.1:9091/transmission
    ProxyPassReverse /transmission http://127.0.0.1:9091/transmission
    Redirect permanent / /transmission/web/

    <Location /transmission>
        Order Allow,Deny
        Allow from All
    </Location>
</VirtualHost>

I want the redirect to ONLY work under the transmission subdomain. Currently if I go to blah.fakedns.com/ I'll get redirected to blah.fakedns.com/transmission/web/ and it loads fine - but I don't want it to. Is there something wrong with my vhosts file above?

Also the reverse-proxy with mod_proxy should only be working for the subdomain as well so I'm having the same issue with that.

I understand that I've been using the term 'subdomain' thus far to refer to sub-subdomains, but I've got it all hooked up to a DynDNS account so I can only add new sub-subdomains, could that be an issue?

Thanks in advance for any help!

link|improve this question
feedback

3 Answers

up vote 1 down vote accepted

Have you defined a vhost for the servername "blah.fakedns.com" ?

If you don't have done that, Apache will take the first loaded vhost as a "fallback" vhost whenever the host name is not defined anywhere in Apache.

This would make sense since if you don't have defined the other vhost for the apps you want to access, Apache will serve you with the first vhost it has loaded (probaby the one about Transmission)

I hope this helps you.

link|improve this answer
feedback

Thanks thib! That was the first vhost that I set up so I hadn't thought to try to make another yet. Now that I've created the 'main' vhost it works as expected.

link|improve this answer
This is fixable... accounts merged. Though I think new users need to wait 24 hours before marking as accepted. – sysadmin1138 May 23 '11 at 21:00
feedback

I know this is fixed but I just wanted to point something out. I followed this answer and the settings work. I did encounter an issue though. Using Apache 2.2.20, loading mod_proxy alone won't work. It now has separate proxy modules one of which is proxy_http. This proxy is the one that is needed to make the settings work. Otherwise you'll get a 500 error.

Thanks for the post and config settings though :)

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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