Apache
Apache Software Foundation - http://www.apache.org/
Also a huge number of projects at Apache - http://www.apache.org/#projects-list
http://httpd.apache.org/docs/2.4/
Scalped By Apache !
One of those simple things that turns out to be a BFD. I've got to learn a new regimen or else just use WSGI/DocRoot configurations ... using ports other than 80 for HTTP is something you're not supposed to want to do.
Damn all SRV records !
See Servers#Apache
Apache With Proxy Server
http://www.slideshare.net/bryan_call/choosing-a-proxy-server-apachecon-2014
https://www.howtoforge.com/community/threads/redirect-subdomain-to-specific-port.64147/
<VirtualHost xxx.xxx.xxx.xxx:80> ServerName sub.domain.com ProxyPass / http://localhost:9090/ </VirtualHost>
NameVirtualHost *:80 <VirtualHost *> ServerAdmin me@mydomain.com ServerName dev.mydomain.com ProxyPreserveHost On # setup the proxy <Proxy *> Order allow,deny Allow from all </Proxy> ProxyPass / http://localhost:8888/ ProxyPassReverse / http://localhost:8888/ </VirtualHost>
Probably over-complicated
https://gist.github.com/fduran/4271967
# www.fduran.com # redirect from apache port (:8080 for ex for tomcat etc) to subdomain # in apache config: <VirtualHost *:80> ServerName subdomain.example.com ProxyPass / http://127.0.0.1:8080/ ProxyPassReverse / http://127.0.0.1:8080/ </VirtualHost>
There are two ways to do this. You could use the VirtualHost section of your httpd.conf or you could do it in your .htaccess. (assuming that the subdomains resolve to the same IP as your webserver) In httpd.conf: <VirtualHost *:80> ServerName subsonic.mydomain.com redirect / http://mydomain.com:4040/ </VirtualHost> In .htaccess: RewriteEngine on RewriteCond %{HTTP_HOST} ^subsonic\.mydomain\.com$ [NC] RewriteRule ^(.*)$ http://mydomain.com:4040/$1 [R=301]
http://stackoverflow.com/questions/8541182/apache-redirect-to-another-port
<VirtualHost *:80> ProxyPreserveHost On ProxyRequests Off ServerName www.example.com ServerAlias example.com ProxyPass / http://localhost:8080/example/ ProxyPassReverse / http://localhost:8080/example/ </VirtualHost>
http://serverfault.com/questions/85078/how-to-forward-dns-alias-to-hostnameport/85115#85115
Listen IP_ADDR:80 NameVirtualHost IP_ADDR:80 <VirtualHost IP_ADDR:80> ServerName yourname.yourdomain ProxyPass / http://localhost:10000/ ProxyPassReverse / http://localhost:10000/ </VirtualHost>
http://freedif.org/how-to-redirect-a-port-to-a-sub-domain-proxypass/
<VirtualHost *:80> ServerAdmin webmaster@freedif.org ServerName del.freedif.org ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass / http://localhost:9092/ ProxyPassReverse / http://localhost:9092/ </VirtualHost>
http://httpd.apache.org/docs/current/vhosts/name-based.html
http://httpd.apache.org/docs/trunk/vhosts/examples.html
Note that Apache does not provide any actual examples of what I and many other people are trying to do ...
http://httpd.apache.org/docs/current/mod/mod_proxy.html
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html
Apache version issues ?
http://forum.slicehost.com/index.php?p=/discussion/4110/redirecthide-port-number-in-url/p1
Some of these instructions use both proxy_mod and rewrite_mod to get a subdomain on a port ... what a kludge.
http://thatextramile.be/blog/2012/01/hosting-a-node-js-site-through-apache/
You'll first need to install mod_proxy and mod_proxy_http. After that, the configuration to make it work is quite easy:
<VirtualHost 109.74.199.47:80> ServerAdmin davy.brion@thatextramile.be ServerName thatextramile.be ServerAlias www.thatextramile.be ProxyRequests off <Proxy *> Order deny,allow Allow from all </Proxy> <Location /> ProxyPass http://localhost:3000/ ProxyPassReverse http://localhost:3000/ </Location> </VirtualHost>
Aha ! ProxyPassReverse will take care of mapping the port back to the subdomain. Maybe it's not so bad after all. Good clear instructions ... a rare thing.
Apache: The Bottom Line
There's no way all this stuff will work on Windows, even if I have the time and patience to fiddle with it. Would it be easier to uninstall Servers#Apache and use Servers#Lighttpd or some other server ?
Or just accept another asymmetry and submit to The Apache Way ? -> http://trac.edgewall.org/wiki/TracModWSGI
Re-deploy with mod_WSGI, save myself a headache, why not !
See TracModWSGI or in a pinch TracCgi