Integrating Subsonic into existing Apache Web Space
Posted: Mon Feb 09, 2009 6:08 pm
If anyone would like to integrate their Subsonic interface into their regular web space (as opposed to people going to your host on the specific port you have configured for Subsonic - e.g. http://www.yourdomain.org:8080), a couple of lines in the Apache config file if you have enabled the Apache mod_proxy module (I'm less familiar with IIS, but there appears to be several reverse proxy tools out there for it), and you're off to the races.
I run Subsonic on a CentOS 5 Linux host, running Apache 2.2
The default config file for the Apache instance (adjust as per your Apache configuration) is: /etc/httpd/conf/httpd.conf
I have installed Subsonic under /opt/subsonic, and the *NIX shell script to start the server is therefore: /opt/subsonic/subsonic.sh
I have added the following two lines to my Apache config:
That configuration needs to be matched in the Subsonic config file with this directive:
Reload the Apache config file:
http://www.yourdomain.org/groovy
This has one effect that people may like or dislike. Whereas the Players in Subsonic may be associated with a dynamic IP of the user if they are accessing the application directly (e.g. at http://www.yourdomain.org:8080 in my above example), all players will be considered as coming from the loopback (127.0.0.1) address as far as Subsonic is concerned when configuring this kind of setup.
On the security side, it's one less port you need to expose directly, and there are many of the mod_security directives you can use to help protect the server/application anyway.
Good luck!
I run Subsonic on a CentOS 5 Linux host, running Apache 2.2
The default config file for the Apache instance (adjust as per your Apache configuration) is: /etc/httpd/conf/httpd.conf
I have installed Subsonic under /opt/subsonic, and the *NIX shell script to start the server is therefore: /opt/subsonic/subsonic.sh
I have added the following two lines to my Apache config:
- Code: Select all
ProxyPass /groovy http://localhost:8080/groovy
ProxyPassReverse /groovy http://localhost:8080/groovy
That configuration needs to be matched in the Subsonic config file with this directive:
- Code: Select all
SUBSONIC_CONTEXT_PATH=/groovy
Reload the Apache config file:
- Code: Select all
service httpd reload
http://www.yourdomain.org/groovy
This has one effect that people may like or dislike. Whereas the Players in Subsonic may be associated with a dynamic IP of the user if they are accessing the application directly (e.g. at http://www.yourdomain.org:8080 in my above example), all players will be considered as coming from the loopback (127.0.0.1) address as far as Subsonic is concerned when configuring this kind of setup.
On the security side, it's one less port you need to expose directly, and there are many of the mod_security directives you can use to help protect the server/application anyway.
Good luck!