• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 477
  • Last Modified:

Issues Setting Up Reverse Proxy (via Apache for Windows) for Subsonic

Hey Guys -

After not using it for a while, I decided to set Subsonic back up on my home server today. I installed and configured it without issue and still even had 4040 forwarded in my router. I also host many other web-based apps & services on the server and therefore have Reverse Proxy via Apache set up and configured so that I may access each of them from a central address - plus - have them all under the HTTPS SSL cert I purchased for my domain name.

My Issue
I added Subsonic to the conf file as I did all my other services. When I test it, though, it doesn't work. When browsing to the new address via reverse proxy, I go to "https://mydomainname.com/subsonic" but fails. Instead, I get the 404 error: "Not Found - The requested URL /index. view was not found on this server." Also, in the address bar the address has changed from "https://mydomainname.com/subsonic" to "https://mydomainname.com/index.view"

Apache, Subsonic, and even my media are all installed on Windows 8.1 Update 1 x64 which is fully patched. I have Windows Firewall completely disabled as I manage all firewall configs directly on my router (OpenWRT.) I found a few resources online and tried different configurations, but they either didn't work or the Apache service wouldn't start after making the changes. Most resource I found online were for Linux installations, but most except paths should be the same I thought. Below are my two Apache conf files I use - httpd.conf & httpd-ssl.conf. All locations for RP are defined at the end of httpd.conf with Subsonic's settings at the very end of the conf file. Based on what I've seen, it seems that the way I have Apache configured (using two files) may not be common, but it's how the guide I used said to set it up and it works for my other sites.

Note: Here are the complete files to download/view or they are listed below excluding comments to save space. Each have obviously been renamed to *.txt for attachment purposes.
httpd.conf.txt
httpd-ssl.conf.txt

My "httpd.conf" (C:\Apache24\conf)
ServerRoot "c:/Apache24"
Listen 85
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule allowmethods_module modules/mod_allowmethods.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule include_module modules/mod_include.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
LoadModule ssl_module modules/mod_ssl.so
<IfModule unixd_module>
User daemon
Group daemon
</IfModule>
ServerAdmin admin@example.com
<Directory />
AllowOverride none
Require all denied
</Directory>
DocumentRoot "c:/Apache24/htdocs"
<Directory "c:/Apache24/htdocs">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
DirectoryIndex index.html
</IfModule>
<Files ".ht*">
Require all denied
</Files>
ErrorLog "logs/error.log"
LogLevel warn
<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
CustomLog "logs/access.log" common
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "c:/Apache24/cgi-bin/"
</IfModule>
<IfModule cgid_module>
</IfModule>
<Directory "c:/Apache24/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>
<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
</IfModule>
<IfModule proxy_html_module>
Include conf/extra/proxy-html.conf
</IfModule>
Include conf/extra/httpd-ssl.conf
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
<Location /sabnzbd>
order deny,allow
deny from all
allow from all
ProxyPass http://192.168.0.25:8080/sabnzbd
ProxyPassReverse http://192.168.0.25:8080/sabnzbd
</Location>
<Location /sonarr>
order deny,allow
deny from all
allow from all
ProxyPass http://192.168.0.25:8989/sonarr
ProxyPassReverse http://192.168.0.25:8989/sonaar
</Location>
<Location /couch>
order deny,allow
deny from all
allow from all
ProxyPass http://192.168.0.25:5050/couch
ProxyPassReverse http://192.168.0.25:5050/couch
</Location>
<Location /headphonesflac>
order deny,allow
deny from all
allow from all
ProxyPass http://localhost:8181
ProxyPassReverse http://localhost:8181
</Location>
<Location /headphonesmp3>
order deny,allow
deny from all
allow from all
ProxyPass http://localhost:8282
ProxyPassReverse http://localhost:8282
</Location>
<Location /htpcman>
order deny,allow
deny from all
allow from all
ProxyPass http://localhost:8085/htpcman
ProxyPassReverse http://localhost:8085/htpcman
</Location>
<Location /mar>
order deny,allow
deny from all
allow from all
ProxyPass http://localhost:7000
ProxyPassReverse http://localhost:7000
</Location>
<Location /subsonic>
order allow,deny
allow from all
ProxyPass http://192.168.0.25:4040/
ProxyPassReverse http://192.168.0.25:4040/
</Location>


My "httpd-ssl.conf" (C:\Apache24\conf\extra)
Listen 443
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLPassPhraseDialog builtin
SSLSessionCache "shmcb:c:/Apache24/logs/ssl_scache(512000)"
SSLSessionCacheTimeout 300
<VirtualHost _default_:443>
DocumentRoot "c:/Apache24/htdocs"
ServerName mydomainname.com:443
ServerAlias mydomainname.com:443
ServerAdmin bmy@email.com
ErrorLog "c:/Apache24/logs/error.log"
TransferLog "c:/Apache24/logs/access.log"
#SSLProxyEngine onServerAdmin my@email.com
SSLEngine on
SSLCertificateFile "c:/Apache24/conf/mycert.pem"
SSLCertificateKeyFile "c:/Apache24/conf/myserver.key"
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory "c:/Apache24/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-5]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
</VirtualHost>

System Specs
- Windows 8.1 Update 1 x64 Fully Patched
- Edited Security on Subsonic folder to give Users full rights
- Subsonic 5.2.1 (build 4428) – March 4, 2015 - Installed using defaults
- HTTP set to 4040 / Default homepage is "http://localhost:4040/index.view"
- Mostly use Google Chrome but tried in IE locally and remotely also
- Do have myserver.subsonic.org configured - perhaps put it in conf file instead of local ip?

Well, that's about it. Any suggestions for how to get reverse proxy working given my setup would be very much appreciated. Thank You!
0
BzowK
Asked:
BzowK
1 Solution
 
David Johnson, CD, MVPOwnerCommented:
you have order deny,allow in all but subsonic where you have order allow,deny
you have mixed mydoman.com and localhost and 192.168.0.25, no vhost.conf ?

http.conf with comments removed
ServerRoot "c:/Apache24"
Listen 85
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule allowmethods_module modules/mod_allowmethods.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule include_module modules/mod_include.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
LoadModule ssl_module modules/mod_ssl.so

<IfModule unixd_module>
User daemon
Group daemon
</IfModule>

ServerAdmin admin@example.com
<Directory />
    AllowOverride none
    Require all denied
</Directory>

DocumentRoot "c:/Apache24/htdocs"
<Directory "c:/Apache24/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>
<Files ".ht*">
    Require all denied
</Files>

ErrorLog "logs/error.log"

LogLevel warn

<IfModule log_config_module>

    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common

    <IfModule logio_module>
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>
    CustomLog "logs/access.log" common

</IfModule>

<IfModule alias_module>
    ScriptAlias /cgi-bin/ "c:/Apache24/cgi-bin/"

</IfModule>

<IfModule cgid_module>
</IfModule>
<Directory "c:/Apache24/cgi-bin">
    AllowOverride None
    Options None
    Require all granted
</Directory>

<IfModule mime_module>
    TypesConfig conf/mime.types
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz

</IfModule>
<IfModule proxy_html_module>
Include conf/extra/proxy-html.conf
</IfModule>

# Secure (SSL/TLS) connections
Include conf/extra/httpd-ssl.conf
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
#

<Location /sabnzbd>
order deny,allow
deny from all
allow from all
ProxyPass http://mydomainname.com:8080/sabnzbd
ProxyPassReverse http://mydomainname.com:8080/sabnzbd
</Location>

<Location /sonarr>
order deny,allow
deny from all
allow from all
ProxyPass http://mydomainname.com:8989/sonarr
ProxyPassReverse http://mydomainname.com:8989/sonaar
</Location>

<Location /couch>
order deny,allow
deny from all
allow from all
ProxyPass http://mydomainname.com:5050/couch
ProxyPassReverse http://mydomainname.com:5050/couch
</Location>

<Location /hpflac>
order deny,allow
deny from all
allow from all
ProxyPass http://localhost:8282
ProxyPassReverse http://localhost:8282
</Location>

<Location /headphonesflac>
order deny,allow
deny from all
allow from all
ProxyPass http://localhost:8181
ProxyPassReverse http://localhost:8181
</Location>

<Location /headphonesmp3>
order deny,allow
deny from all
allow from all
ProxyPass http://localhost:8282
ProxyPassReverse http://localhost:8282
</Location>

<Location /htpcman>
order deny,allow
deny from all
allow from all
ProxyPass http://localhost:8085/htpcman
ProxyPassReverse http://localhost:8085/htpcman
</Location>

<Location /mar>
order deny,allow
deny from all
allow from all
ProxyPass http://localhost:7000
ProxyPassReverse http://localhost:7000
</Location>

<Location /plex>
order deny,allow
deny from all
allow from all
ProxyPass http://mydomainname.com:32400/web
ProxyPassReverse http://mydomainname.com:32400/web
</Location>

<Location /subsonic>
order allow,deny
allow from all
ProxyPass http://192.168.0.25:4040/
ProxyPassReverse http://192.168.0.25:4040/
</Location>

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now