Markyb0y Posted April 2, 2015 Share Posted April 2, 2015 I am at step 2, setting up the reverse proxy. And it isn't working. Link to comment
CHBMB Posted April 3, 2015 Share Posted April 3, 2015 I am at step 2, setting up the reverse proxy. And it isn't working. OK, so lets check you can actually reach apache from your domain name. <?php // Show all information, defaults to INFO_ALL phpinfo(); ?> Copy the above and save it into a file called info.php and put it in your /web folder. Then go to your domain name www.yourdomain.tld/info.php You should get a screen with a load of info up. This will confirm we can at least reach your unraid box from the web, and you've definitely opened port 80 on your router and are forwarding it to your Unraid box. Secondly, please post your exact proxy-config.conf file here but for security reasons just change the Servername variable when you post to something different (In my example file I posted I used www.example.com Link to comment
wickedathletes Posted April 3, 2015 Share Posted April 3, 2015 smdion, any chance you could rebuild the PlexReport docker so it functions with Plex Home? The Plex Home features went in about a day after you built it last and I would love trying it out Link to comment
smdion Posted April 3, 2015 Author Share Posted April 3, 2015 smdion, any chance you could rebuild the PlexReport docker so it functions with Plex Home? The Plex Home features went in about a day after you built it last and I would love trying it out Did some updates and bumped the plexReport thread. Let me know how that goes. Link to comment
Markyb0y Posted April 4, 2015 Share Posted April 4, 2015 OK, so lets check you can actually reach apache from your domain name. its not even working internally let alone externally.... my IP is 192.168.1.86 if I go to http://192.168.1.86 i get nothing, just a blank page same for http://192.168.1.86/info.php I know its the correct IP as its what I use for SB and CP etc. its as if it isn't actually using port 80 at all, yet log seems fine *** Running /etc/my_init.d/firstrun.sh... Using existing config file. *** Running /etc/rc.local... *** Booting runit daemon... *** Runit started as PID 9 Setting up watches. Watches established. Link to comment
CHBMB Posted April 4, 2015 Share Posted April 4, 2015 OK, so lets check you can actually reach apache from your domain name. its not even working internally let alone externally.... my IP is 192.168.1.86 if I go to http://192.168.1.86 i get nothing, just a blank page same for http://192.168.1.86/info.php I know its the correct IP as its what I use for SB and CP etc. its as if it isn't actually using port 80 at all, yet log seems fine *** Running /etc/my_init.d/firstrun.sh... Using existing config file. *** Running /etc/rc.local... *** Booting runit daemon... *** Runit started as PID 9 Setting up watches. Watches established. Can you post your proxy-config.conf? Link to comment
Markyb0y Posted April 4, 2015 Share Posted April 4, 2015 pretty much as I showed before, with www.domain.com as my noip subdomain <VirtualHost *:80> ServerName www.domain.com ServerAdmin webmaster@localhost DocumentRoot /var/www <Location /> ProxyPass http://192.168.1.86 ProxyPassReverse http://192.168.1.86 </Location> </VirtualHost> Link to comment
CHBMB Posted April 4, 2015 Share Posted April 4, 2015 pretty much as I showed before, with www.domain.com as my noip subdomain <VirtualHost *:80> ServerName www.domain.com ServerAdmin webmaster@localhost DocumentRoot /var/www <Location /> ProxyPass http://192.168.1.86 ProxyPassReverse http://192.168.1.86 </Location> </VirtualHost> OK, for the purposes of getting it working internally try this: <VirtualHost *:80> ServerName 192.168.86 ServerAdmin webmaster@localhost DocumentRoot /var/www <Location /couch> ProxyPass http://192.168.1.1:5050/couch ProxyPassReverse http://192.168.1.1:5050/couch </Location> </VirtualHost> Then edit couchpotato settings (you need to tick "Use Advanced Settings") to match the box I've highlighted in red I think this should mean that if you go to 192.168.1.86/info.php You should see the phpinfo page & 192.168.1.86/couch Should take you to couchpotato. I know this is only internally but I don't use noip, so it would narrow it down to an issue resolving your domain name. Link to comment
Markyb0y Posted April 4, 2015 Share Posted April 4, 2015 Internally all my apps work fine without reverse proxy Http://192.168.1.86:8181/sickbeard etc Will try these settings later to try and proxy the port number Thanks Link to comment
CHBMB Posted April 4, 2015 Share Posted April 4, 2015 Internally all my apps work fine without reverse proxy Http://192.168.1.86:8181/sickbeard etc Will try these settings later to try and proxy the port number Thanks No worries mate, I'm just wondering if your problem is with resolving your domain name to your external IP address rather than an issue with your Apache setup that's all. I think if the above works it would point to that being an issue. How's the weather down the South West? Pass through Bristol a lot to visit my in-laws in Cornwall. Link to comment
Markyb0y Posted April 6, 2015 Share Posted April 6, 2015 ok, so after starting all over again i now have the basic setup working, it is proxying however I think I need a couple of rewrite rules to change the addresses it goes to for example, headphones I go to http://192.168.1.86/headphones and it proxies to http://192.168.1.86/:8181/headphones/home I guess I need to rewrite the proxy somehow to remove the /:8181 from the address, any ideas? sickbeard adds just a second slash, http://192.168.1.86//sickbeard/home/ and nzbmegasearch works but the CSS fails so it looks a mess, any ideas on that also? thanks..... Link to comment
CHBMB Posted April 6, 2015 Share Posted April 6, 2015 ok, so after starting all over again i now have the basic setup working, it is proxying however I think I need a couple of rewrite rules to change the addresses it goes to for example, headphones I go to http://192.168.1.86/headphones and it proxies to http://192.168.1.86/:8181/headphones/home I guess I need to rewrite the proxy somehow to remove the /:8181 from the address, any ideas? sickbeard adds just a second slash, http://192.168.1.86//sickbeard/home/ and nzbmegasearch works but the CSS fails so it looks a mess, any ideas on that also? thanks..... Alright then my lover.... (Sorry couldn't resist, wife says it to me and it cracks me up, especially when I'm from Wolverhampton so have such a sophisticated accent! ) Try and post your proxy-config.conf when you have problems, makes life a bit easier for us to sort out, that being said, I don't use headphones, sickbeard or nzbmegasearch, but in the interests of experimentation I've downloaded them all. Sickbeard - You need to edit config.ini and make sure that this is set web_root = /sickbeard Couchpotato, we've already covered. Headphones - You need to edit config.ini and make sure this is set http_root = /headphones NZBMegasearch was a bit of a bugger to get working and there is very little information on the web about it but in the config setting at the top there is a box saying Reverse proxy dir or full url (must include http(s)://) That needs to read http://IP-ADDRESS OR DOMAIN.COM/nzbmegasearch Then your proxy-config.conf should look like this <VirtualHost *:80> ServerName IP-ADDRESS OR DOMAIN.COM ServerAdmin webmaster@localhost DocumentRoot /var/www ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined <Location /couch> ProxyPass http://IP-ADDRESS:5050/couch ProxyPassReverse http://IP-ADDRESS:5050/couch </Location> <Location /sickbeard/> ProxyPass http://IP-ADDRESS:8081/sickbeard/ ProxyPassReverse http://IP-ADDRESS:8081/sickbeard/ </Location> <Location /headphones/> ProxyPass http://IP-ADDRESS:8181/headphones/ ProxyPassReverse http://IP-ADDRESS:8181/headphones/ </Location> <Location /nzbmegasearch> ProxyPass http://IP-ADDRESS:5000 ProxyPassReverse http://IP-ADDRESS:5000 </Location> </VirtualHost> See how that works out for you. EDITED: Formatting and error with NZBMegaSearch Link to comment
CHBMB Posted April 6, 2015 Share Posted April 6, 2015 Don't forget if you're going to put your domain.com address in then it is very strongly / necessary to use SSL and password protect everything. Link to comment
Markyb0y Posted April 6, 2015 Share Posted April 6, 2015 all apps are already set to use /appname in webroot etc. so have always been accessed via http://server:port/appname <VirtualHost *:80> ServerName sub.domain.com ServerAdmin webmaster@localhost DocumentRoot /var/www <Location /> ProxyPass http://192.168.1.86 ProxyPassReverse http://192.168.1.86 </Location> <Location /sickbeard> ProxyPass http://192.168.1.86:8081/sickbeard ProxyPassReverse http://192.168.1.86:8081/sickbeard AuthName "SickBeard - Proxy" </Location> <Location /couchpotato> ProxyPass http://192.168.1.86:5050/couchpotato ProxyPassReverse http://192.168.1.86:5050/couchpotato AuthName "CouchPotato - Proxy" </Location> <Location /headphones> ProxyPass http://192.168.1.86:8181/headphones ProxyPassReverse http://192.168.1.86:8181/headphones AuthName "Headphones - Proxy" </Location> <Location /lazylibrarian> ProxyPass http://192.168.1.86:5299/lazylibrarian ProxyPassReverse http://192.168.1.86:5299/lazylibrarian AuthName "Lazy Librarian - Proxy" </Location> <Location /mylar> ProxyPass http://192.168.1.86:8090/mylar ProxyPassReverse http://192.168.1.86:8090/mylar AuthName "Mylar - Proxy" </Location> <Location /ubooquity> ProxyPass http://192.168.1.86:8085/ubooquity ProxyPassReverse http://192.168.1.86:8085/ubooquity AuthName "Ubooquity - Proxy" </Location> <Location /nzbmegasearch> ProxyPass http://192.168.1.86:5000/nzbmegasearch ProxyPassReverse http://192.168.1.86:5000/nzbmegasearch AuthName "NZB Mega Search - Proxy" </Location> <Location /sabnzbd> ProxyPass http://192.168.1.86/sabnzbd ProxyPassReverse http://192.168.1.86/sabnzbd AuthName "sabNZBd - Proxy" </Location> <Location /transmission> ProxyPass http://192.168.1.86/transmission ProxyPassReverse http://192.168.1.86/transmission AuthName "Transmission - Proxy" </Location> </VirtualHost> as I say they now all appear to work but would like to get all proxy rewrites done so all become http://server/appname Link to comment
smdion Posted April 6, 2015 Author Share Posted April 6, 2015 all apps are already set to use /appname in webroot etc. so have always been accessed via http://server:port/appname <VirtualHost *:80> ServerName sub.domain.com ServerAdmin webmaster@localhost DocumentRoot /var/www <Location /> ProxyPass http://192.168.1.86 ProxyPassReverse http://192.168.1.86 </Location> <Location /sickbeard> ProxyPass http://192.168.1.86:8081/sickbeard ProxyPassReverse http://192.168.1.86:8081/sickbeard AuthName "SickBeard - Proxy" </Location> <Location /couchpotato> ProxyPass http://192.168.1.86:5050/couchpotato ProxyPassReverse http://192.168.1.86:5050/couchpotato AuthName "CouchPotato - Proxy" </Location> <Location /headphones> ProxyPass http://192.168.1.86:8181/headphones ProxyPassReverse http://192.168.1.86:8181/headphones AuthName "Headphones - Proxy" </Location> <Location /lazylibrarian> ProxyPass http://192.168.1.86:5299/lazylibrarian ProxyPassReverse http://192.168.1.86:5299/lazylibrarian AuthName "Lazy Librarian - Proxy" </Location> <Location /mylar> ProxyPass http://192.168.1.86:8090/mylar ProxyPassReverse http://192.168.1.86:8090/mylar AuthName "Mylar - Proxy" </Location> <Location /ubooquity> ProxyPass http://192.168.1.86:8085/ubooquity ProxyPassReverse http://192.168.1.86:8085/ubooquity AuthName "Ubooquity - Proxy" </Location> <Location /nzbmegasearch> ProxyPass http://192.168.1.86:5000/nzbmegasearch ProxyPassReverse http://192.168.1.86:5000/nzbmegasearch AuthName "NZB Mega Search - Proxy" </Location> <Location /sabnzbd> ProxyPass http://192.168.1.86/sabnzbd ProxyPassReverse http://192.168.1.86/sabnzbd AuthName "sabNZBd - Proxy" </Location> <Location /transmission> ProxyPass http://192.168.1.86/transmission ProxyPassReverse http://192.168.1.86/transmission AuthName "Transmission - Proxy" </Location> </VirtualHost> as I say they now all appear to work but would like to get all proxy rewrites done so all become http://server/appname If it works on the :PORT, that means you are not going through the reverse proxy, you are going directly to the webapp. What happens if you do IPofunRAID/sickbeard ? Link to comment
CHBMB Posted April 6, 2015 Share Posted April 6, 2015 all apps are already set to use /appname in webroot etc. so have always been accessed via http://server:port/appname as I say they now all appear to work but would like to get all proxy rewrites done so all become http://server/appname Do you mean domain name? Link to comment
Markyb0y Posted April 6, 2015 Share Posted April 6, 2015 no, want to get it working locally before I start using a subdomain name go back to reply #310 "I go to http://192.168.1.86/headphones and it proxies to http://192.168.1.86/:8181/headphones/home" so I think the proxy is working just fine if I can just get the URLs standardised as http://server/appname then I will be able to start looking at moving to SSL Link to comment
smdion Posted April 6, 2015 Author Share Posted April 6, 2015 Can you post your proxy config. I can't think of any reason why its doing that. Link to comment
CHBMB Posted April 6, 2015 Share Posted April 6, 2015 no, want to get it working locally before I start using a subdomain name go back to reply #310 "I go to http://192.168.1.86/headphones and it proxies to http://192.168.1.86/:8181/headphones/home" so I think the proxy is working just fine if I can just get the URLs standardised as http://server/appname then I will be able to start looking at moving to SSL I can't reach my unraid box on my LAN without using the IP, so I can't test this, but my config is very similar to yours other than Servername mydomain.com And that works fine over the interweb. Link to comment
CHBMB Posted April 6, 2015 Share Posted April 6, 2015 Another quick question if I may, and I understand you're busy at the moment so no problems if you can't answer it. I'm using you apache reverse proxy (modified slightly by me as I explained in a PM a while back - just some extra php stuff) Using wordpress I can only install themes etc by manually downloading and copying to the appropriate directory, not a problem particularly but FTP access would make things a fair bit easier, how do you go about it? Is there a way to run a FTP server in the docker to place content into a mapped volume (/web) or have I got the wrong idea here? I have an OpenVPN connection on my router, that I connect to, than make an SFTP connection to my unRAID box to upload files. PS: Couldn't get the owncloud reverse proxy working, but I'll continue playing with it for a while longer, like I said before I've got it installed manually into my /web folder and working with SSL and all my website redirects to SSL anyway with a rule in proxy-config.conf so no urgency at all to get the owncloud container going as other than being nice and automatic in the case of reinstall. I'm using gfjardim's docker for owncloud. What part of it is not working? What program do you use on your unraid server for FTP access? Still trying to work this one out... Link to comment
Markyb0y Posted April 6, 2015 Share Posted April 6, 2015 no, want to get it working locally before I start using a subdomain name go back to reply #310 "I go to http://192.168.1.86/headphones and it proxies to http://192.168.1.86/:8181/headphones/home" so I think the proxy is working just fine if I can just get the URLs standardised as http://server/appname then I will be able to start looking at moving to SSL I can't reach my unraid box on my LAN without using the IP, so I can't test this, but my config is very similar to yours other than Servername mydomain.com And that works fine over the interweb. but what about the proxy mod rewriting of the URL? this is the only bit i need changed now "I go to http://192.168.1.86/headphones and it proxies to http://192.168.1.86/:8181/headphones/home" I want "http://192.168.1.86/headphones" to proxy to "http://192.168.1.86/headphones/home" and not to "http://192.168.1.86/:8181/headphones/home" dont i need some sort of rewrite rule in the section to remove the port part of the proxied url? Link to comment
smdion Posted April 6, 2015 Author Share Posted April 6, 2015 Can you post your config file of apache reverse proxy? Link to comment
CHBMB Posted April 6, 2015 Share Posted April 6, 2015 no, want to get it working locally before I start using a subdomain name go back to reply #310 "I go to http://192.168.1.86/headphones and it proxies to http://192.168.1.86/:8181/headphones/home" so I think the proxy is working just fine if I can just get the URLs standardised as http://server/appname then I will be able to start looking at moving to SSL I can't reach my unraid box on my LAN without using the IP, so I can't test this, but my config is very similar to yours other than Servername mydomain.com And that works fine over the interweb. but what about the proxy mod rewriting of the URL? this is the only bit i need changed now "I go to http://192.168.1.86/headphones and it proxies to http://192.168.1.86/:8181/headphones/home" I want "http://192.168.1.86/headphones" to proxy to "http://192.168.1.86/headphones/home" and not to "http://192.168.1.86/:8181/headphones/home" dont i need some sort of rewrite rule in the section to remove the port part of the proxied url? I can't reproduce this, so I'm not sure what's going on with that. Have you checked your headphones config.ini? Link to comment
CHBMB Posted April 6, 2015 Share Posted April 6, 2015 Also make sure you've stopped and started the reverse-proxy docker, smdion has written a script which does this automagically when it detects a change but I've found very occasionally it doesn't work. Link to comment
Malykai Posted April 19, 2015 Share Posted April 19, 2015 Sorry if this has been answered before and I just overlooked it throughout the forums... I've tried installing the headphones docker a couple of times but without the EDGE value set it tells me it doesn't know what version I am running, and I hadn't been able to get any of my music added. So I tried fresh setting EDGE to 1 and it is not loading at all. This is what is showing in the logs: *** Running /etc/my_init.d/00_regen_ssh_host_keys.sh... No SSH host key available. Generating one... Creating SSH2 RSA key; this may take some time ... Creating SSH2 DSA key; this may take some time ... Creating SSH2 ECDSA key; this may take some time ... Creating SSH2 ED25519 key; this may take some time ... invoke-rc.d: policy-rc.d denied execution of restart. *** Running /etc/my_init.d/edge.sh... Reading package lists... Building dependency tree... Reading state information... The following extra packages will be installed: git-man liberror-perl patch rsync Suggested packages: gettext-base git-daemon-run git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-arch git-bzr git-cvs git-mediawiki git-svn ed diffutils-doc The following NEW packages will be installed: git git-man liberror-perl patch rsync 0 upgraded, 5 newly installed, 0 to remove and 33 not upgraded. Need to get 3642 kB of archives. After this operation, 22.5 MB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu/ trusty-updates/main rsync amd64 3.1.0-2ubuntu0.1 [283 kB] Get:2 http://archive.ubuntu.com/ubuntu/ trusty/main liberror-perl all 0.17-1.1 [21.1 kB] Get:3 http://archive.ubuntu.com/ubuntu/ trusty/main git-man all 1:1.9.1-1 [698 kB] Get:4 http://archive.ubuntu.com/ubuntu/ trusty/main git amd64 1:1.9.1-1 [2555 kB] Err http://archive.ubuntu.com/ubuntu/ trusty-updates/main patch amd64 2.7.1-4ubuntu1 404 Not Found [iP: 91.189.91.23 80] Fetched 3557 kB in 2min 25s (24.4 kB/s) E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/patch/patch_2.7.1-4ubuntu1_amd64.deb 404 Not Found [iP: 91.189.91.23 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? /etc/my_init.d/edge.sh: line 9: git: command not found chown: cannot access '/opt/headphones': No such file or directory *** /etc/my_init.d/edge.sh failed with status 1 *** Killing all processes... Link to comment
Recommended Posts