spants Posted December 22, 2012 Author Share Posted December 22, 2012 How I fixed sickbeard with spotweb on Unraid using simplefeatures webserver... I renamed the .htaccess file (to x.htaccess) so that it isnt used and just used the rewrite rules in the lighttpd.cfg described. Stopped sickbeard and edited the config.ini for sickbeard manually and added the http:// to the server ip. Then restarted sickbeard. If I added http:// in the UI, it was not written to the config file. Quote Link to comment
jangjong Posted December 23, 2012 Share Posted December 23, 2012 The rewrite rule appears to be wrong, this link describes how it should be : https://github.com/spotweb/spotweb/issues/1649 rewrite is correct for lighttpd.cfg lighttpd does not use .htaccess at all. This is only for apache server. so unless you're using Apache server, the rewrite rule i specified is correct. and doesen't really matter what htaccess has. you can even delete the file probably I got it from here: https://github.com/spotweb/spotweb/wiki/Spotweb-als-Newznab-Provider also you need to put the whole address when you add it as a search provider. so if it's an IP address, you NEED to include "http" it seems that your error is due to not adding the http infront of your server address when you were adding it to sickbeard Quote Link to comment
Helmonder Posted December 23, 2012 Share Posted December 23, 2012 Looks like I learned something, thanks ! Quote Link to comment
Helmonder Posted December 23, 2012 Share Posted December 23, 2012 I just changed back the lighttpd.cfg to the one in the instruction and added the http:// before the rule in sickbeard. I noticed it still did not work, also noticed that sickbeard did not seem to show the http:// in front of the changed setting (and yes, I did save). I deleted the spotweb entry in sickbeard and remade it, now the configuration sticks and searching also seems to work ! Quote Link to comment
peter_sm Posted December 23, 2012 Share Posted December 23, 2012 I 'm trying this, I put the spotweb folder in my SF server root / same location where I can find admin folder for newznab But I got broken link when acessing http://tower:81/spotweb/install.php Trying to acess this -> http://tower:81/spotweb/images/spotnet.gif I got a images in my browser :-) Any idea why http://tower:81/spotweb/install.php caiuse a error ?? //Peter Quote Link to comment
jangjong Posted December 23, 2012 Share Posted December 23, 2012 I 'm trying this, I put the spotweb folder in my SF server root / same location where I can find admin folder for newznab But I got broken link when acessing http://tower:81/spotweb/install.php'>http://tower:81/spotweb/install.php Trying to acess this -> http://tower:81/spotweb/images/spotnet.gif'>http://tower:81/spotweb/images/spotnet.gif I got a images in my browser :-) Any idea why http://tower:81/spotweb/install.php'>http://tower:81/spotweb/install.php caiuse a error ?? //Peter quick fix is removing the rewrite rule for newznab, and only use the one for spotweb. If you have it so you can access newznab with 'http://tower:81/', then spotweb is going to have a problem becuase newznab's rewrite rule will affect everything under http://tower:81/. including http://tower:81/spotweb. if you just want to try spotweb out, prolly better just to remove rewrite rule for newznab.. if you want to use both of them concurrently, then have their own folder under webroot so it will be http://tower:81/newznab/www and http://tower:81/spotweb/ and change the rewrite rule for newznab or look at my lighttpd.cfg and think about having different ports opened for these sites, and have different rewrite rule for different sockets Quote Link to comment
Helmonder Posted December 24, 2012 Share Posted December 24, 2012 How would you do the two different ports ? Quote Link to comment
jangjong Posted December 24, 2012 Share Posted December 24, 2012 How would you do the two different ports ? Please see my lighttpd.cfg here: http://lime-technology.com/forum/index.php?topic=24804.msg215883#msg215883 Quote Link to comment
Helmonder Posted December 24, 2012 Share Posted December 24, 2012 Just tried it but it does not seem to work (I did restart the webserver), I changed the stuff around that I think should, could you take a look please : # Add your own settings here. These won't get overwritten upon reboot # $SERVER["socket"] == "192.168.1.16:8084" { server.document-root = "/mnt/cache/www/newznab/www/" url.rewrite-once = ( "^/.*\.(css|jpg|jpeg|gif|png|js|ico)" => "$0", "^/(admin|install).*$" => "$0", "^/([^/\.]+)/?(?:\?(.*))$" => "index.php?page=$1&$2", "^/([^/\.]+)/?$" => "index.php?page=$1", "^/([^/\.]+)/([^/]+)/?(?:\?(.*))$" => "index.php?page=$1&id=$2&$3", "^/([^/\.]+)/([^/]+)/?$" => "index.php?page=$1&id=$2", "^/([^/\.]+)/([^/]+)/([^/]+)/?$" => "index.php?page=$1&id=$2&subpage=$3" ) } $SERVER["socket"] == "192.168.1.16:8085" { server.document-root = "/mnt/cache/www/owncloud/" } $SERVER["socket"] == "192.168.1.16:8086" { server.document-root = "/mnt/cache/www/SpotWeb/" url.rewrite-once = ( "^/api\?(.*)" => "/index.php?page=newznabapi&$1" ) } I notice that in the third segment (the one for spotweb), you make a reference to the newznab api, that does not appear to be correct ? Also one question: What port do I fill in in the plugin ? Or is that value overwritten ? Quote Link to comment
jangjong Posted December 24, 2012 Share Posted December 24, 2012 Just tried it but it does not seem to work (I did restart the webserver), I changed the stuff around that I think should, could you take a look please : # Add your own settings here. These won't get overwritten upon reboot # $SERVER["socket"] == "192.168.1.16:8084" { server.document-root = "/mnt/cache/www/newznab/www/" url.rewrite-once = ( "^/.*\.(css|jpg|jpeg|gif|png|js|ico)" => "$0", "^/(admin|install).*$" => "$0", "^/([^/\.]+)/?(?:\?(.*))$" => "index.php?page=$1&$2", "^/([^/\.]+)/?$" => "index.php?page=$1", "^/([^/\.]+)/([^/]+)/?(?:\?(.*))$" => "index.php?page=$1&id=$2&$3", "^/([^/\.]+)/([^/]+)/?$" => "index.php?page=$1&id=$2", "^/([^/\.]+)/([^/]+)/([^/]+)/?$" => "index.php?page=$1&id=$2&subpage=$3" ) } $SERVER["socket"] == "192.168.1.16:8085" { server.document-root = "/mnt/cache/www/owncloud/" } $SERVER["socket"] == "192.168.1.16:8086" { server.document-root = "/mnt/cache/www/SpotWeb/" url.rewrite-once = ( "^/api\?(.*)" => "/index.php?page=newznabapi&$1" ) } I notice that in the third segment (the one for spotweb), you make a reference to the newznab api, that does not appear to be correct ? Also one question: What port do I fill in in the plugin ? Or is that value overwritten ? What is your web root set as under simple feature setting? and port? i recommend creating another folder for the setting in the simple feature web server setting page. so create a folder under 'www', call it 'main' or something. so you will have /mnt/cache/www/main/ path and under simple feature web server setting, set the root to be /mnt/cache/www/main/ this way, your other application is not accessible by doing 'http://tower/spotweb/' this way. Third one is the rewrite rule for spotweb. Spotweb acts as newznab when there's a http request using the api. actually, to be correct, spotweb is able to handle a http newznab request using api. so third one is correct. it's spotweb's api, not newznab again, i didnt create this rewrite rule. i got it from their documentation here: https://github.com/spotweb/spotweb/wiki/Spotweb-als-Newznab-Provider you should be able to test this rewrite rule by using this url in your case: http://192.168.1.16:8086/api?t=c this should give you a simple xml page. what is not working for you? Quote Link to comment
Helmonder Posted December 24, 2012 Share Posted December 24, 2012 Just tried it but it does not seem to work (I did restart the webserver), I changed the stuff around that I think should, could you take a look please : # Add your own settings here. These won't get overwritten upon reboot # $SERVER["socket"] == "192.168.1.16:8084" { server.document-root = "/mnt/cache/www/newznab/www/" url.rewrite-once = ( "^/.*\.(css|jpg|jpeg|gif|png|js|ico)" => "$0", "^/(admin|install).*$" => "$0", "^/([^/\.]+)/?(?:\?(.*))$" => "index.php?page=$1&$2", "^/([^/\.]+)/?$" => "index.php?page=$1", "^/([^/\.]+)/([^/]+)/?(?:\?(.*))$" => "index.php?page=$1&id=$2&$3", "^/([^/\.]+)/([^/]+)/?$" => "index.php?page=$1&id=$2", "^/([^/\.]+)/([^/]+)/([^/]+)/?$" => "index.php?page=$1&id=$2&subpage=$3" ) } $SERVER["socket"] == "192.168.1.16:8085" { server.document-root = "/mnt/cache/www/owncloud/" } $SERVER["socket"] == "192.168.1.16:8086" { server.document-root = "/mnt/cache/www/SpotWeb/" url.rewrite-once = ( "^/api\?(.*)" => "/index.php?page=newznabapi&$1" ) } I notice that in the third segment (the one for spotweb), you make a reference to the newznab api, that does not appear to be correct ? Also one question: What port do I fill in in the plugin ? Or is that value overwritten ? What is your web root set as under simple feature setting? and port? i recommend creating another folder for the setting in the simple feature web server setting page. so create a folder under 'www', call it 'main' or something. so you will have /mnt/cache/www/main/ path and under simple feature web server setting, set the root to be /mnt/cache/www/main/ this way, your other application is not accessible by doing 'http://tower/spotweb/' this way. Third one is the rewrite rule for spotweb. Spotweb acts as newznab when there's a http request using the api. actually, to be correct, spotweb is able to handle a http newznab request using api. so third one is correct. it's spotweb's api, not newznab again, i didnt create this rewrite rule. i got it from their documentation here: https://github.com/spotweb/spotweb/wiki/Spotweb-als-Newznab-Provider you should be able to test this rewrite rule by using this url in your case: http://192.168.1.16:8086/api?t=c this should give you a simple xml page. what is not working for you? The webroot is set to /mnt/cache/www in simplefeatures, port is 81 Quote Link to comment
Helmonder Posted December 24, 2012 Share Posted December 24, 2012 Changed the setup as follows: # Add your own settings here. These won't get overwritten upon reboot # $SERVER["socket"] == "192.168.1.16:81" { server.document-root = "/mnt/cache/www/main/" } $SERVER["socket"] == "192.168.1.16:8084" { server.document-root = "/mnt/cache/www/newznab/www/" url.rewrite-once = ( "^/.*\.(css|jpg|jpeg|gif|png|js|ico)" => "$0", "^/(admin|install).*$" => "$0", "^/([^/\.]+)/?(?:\?(.*))$" => "index.php?page=$1&$2", "^/([^/\.]+)/?$" => "index.php?page=$1", "^/([^/\.]+)/([^/]+)/?(?:\?(.*))$" => "index.php?page=$1&id=$2&$3", "^/([^/\.]+)/([^/]+)/?$" => "index.php?page=$1&id=$2", "^/([^/\.]+)/([^/]+)/([^/]+)/?$" => "index.php?page=$1&id=$2&subpage=$3" ) } $SERVER["socket"] == "192.168.1.16:8085" { server.document-root = "/mnt/cache/www/owncloud/" } $SERVER["socket"] == "192.168.1.16:8086" { server.document-root = "/mnt/cache/www/SpotWeb/" url.rewrite-once = ( "^/api\?(.*)" => "/index.php?page=newznabapi&$1" ) } ~ Something must be wrong, the webserver refuses to start now .. Quote Link to comment
jangjong Posted December 24, 2012 Share Posted December 24, 2012 Changed the setup as follows: # Add your own settings here. These won't get overwritten upon reboot # $SERVER["socket"] == "192.168.1.16:81" { server.document-root = "/mnt/cache/www/main/" } $SERVER["socket"] == "192.168.1.16:8084" { server.document-root = "/mnt/cache/www/newznab/www/" url.rewrite-once = ( "^/.*\.(css|jpg|jpeg|gif|png|js|ico)" => "$0", "^/(admin|install).*$" => "$0", "^/([^/\.]+)/?(?:\?(.*))$" => "index.php?page=$1&$2", "^/([^/\.]+)/?$" => "index.php?page=$1", "^/([^/\.]+)/([^/]+)/?(?:\?(.*))$" => "index.php?page=$1&id=$2&$3", "^/([^/\.]+)/([^/]+)/?$" => "index.php?page=$1&id=$2", "^/([^/\.]+)/([^/]+)/([^/]+)/?$" => "index.php?page=$1&id=$2&subpage=$3" ) } $SERVER["socket"] == "192.168.1.16:8085" { server.document-root = "/mnt/cache/www/owncloud/" } $SERVER["socket"] == "192.168.1.16:8086" { server.document-root = "/mnt/cache/www/SpotWeb/" url.rewrite-once = ( "^/api\?(.*)" => "/index.php?page=newznabapi&$1" ) } ~ Something must be wrong, the webserver refuses to start now .. Remove $SERVER["socket"] == "192.168.1.16:81" { server.document-root = "/mnt/cache/www/main/" } This needs to be set in the setting page of simple feature web server, not in the cfg file. and let me know what is not working when you said "Just tried it but it does not seem to work" Quote Link to comment
jangjong Posted December 24, 2012 Share Posted December 24, 2012 oh, and i hope you dont have ~ at then end of cfg file as you pasted it here.. Quote Link to comment
Helmonder Posted December 24, 2012 Share Posted December 24, 2012 Its now setup as follows and the spotweb webpage works: # Add your own settings here. These won't get overwritten upon reboot # $SERVER["socket"] == "192.168.1.16:8084" { server.document-root = "/mnt/cache/www/newznab/" url.rewrite-once = ( "^/.*\.(css|jpg|jpeg|gif|png|js|ico)" => "$0", "^/(admin|install).*$" => "$0", "^/([^/\.]+)/?(?:\?(.*))$" => "index.php?page=$1&$2", "^/([^/\.]+)/?$" => "index.php?page=$1", "^/([^/\.]+)/([^/]+)/?(?:\?(.*))$" => "index.php?page=$1&id=$2&$3", "^/([^/\.]+)/([^/]+)/?$" => "index.php?page=$1&id=$2", "^/([^/\.]+)/([^/]+)/([^/]+)/?$" => "index.php?page=$1&id=$2&subpage=$3" ) } $SERVER["socket"] == "192.168.1.16:8085" { server.document-root = "/mnt/cache/www/owncloud/" } $SERVER["socket"] == "192.168.1.16:8086" { server.document-root = "/mnt/cache/www/spotweb/" url.rewrite-once = ( "^/api\?(.*)" => "/index.php?page=newznabapi&$1" ) } http://192.168.1.16:8084/ (newznab) gives an error 500 ... Quote Link to comment
jangjong Posted December 24, 2012 Share Posted December 24, 2012 Its now setup as follows and the spotweb webpage works: # Add your own settings here. These won't get overwritten upon reboot # $SERVER["socket"] == "192.168.1.16:8084" { server.document-root = "/mnt/cache/www/newznab/" url.rewrite-once = ( "^/.*\.(css|jpg|jpeg|gif|png|js|ico)" => "$0", "^/(admin|install).*$" => "$0", "^/([^/\.]+)/?(?:\?(.*))$" => "index.php?page=$1&$2", "^/([^/\.]+)/?$" => "index.php?page=$1", "^/([^/\.]+)/([^/]+)/?(?:\?(.*))$" => "index.php?page=$1&id=$2&$3", "^/([^/\.]+)/([^/]+)/?$" => "index.php?page=$1&id=$2", "^/([^/\.]+)/([^/]+)/([^/]+)/?$" => "index.php?page=$1&id=$2&subpage=$3" ) } $SERVER["socket"] == "192.168.1.16:8085" { server.document-root = "/mnt/cache/www/owncloud/" } $SERVER["socket"] == "192.168.1.16:8086" { server.document-root = "/mnt/cache/www/spotweb/" url.rewrite-once = ( "^/api\?(.*)" => "/index.php?page=newznabapi&$1" ) } http://192.168.1.16:8084/ (newznab) gives an error 500 ... this setting: $SERVER["socket"] == "192.168.1.16:8084" { server.document-root = "/mnt/cache/www/newznab/" I'm guessing there is a separate www folder for your newznab under newznab folder just like mine. so it should be /mnt/cache/www/newznab/www/ and make sure 8084 is not used by anything else. Quote Link to comment
Helmonder Posted December 24, 2012 Share Posted December 24, 2012 Thats it, its working ! Thanks! Quote Link to comment
peter_sm Posted December 26, 2012 Share Posted December 26, 2012 Hmm, so how would a complete file looks like ;-) //Peter Quote Link to comment
Helmonder Posted December 26, 2012 Share Posted December 26, 2012 This one works for me: # Add your own settings here. These won't get overwritten upon reboot # $SERVER["socket"] == "192.168.1.11:8084" { server.document-root = "/mnt/cache/www/newznab/www/" url.rewrite-once = ( "^/.*\.(css|jpg|jpeg|gif|png|js|ico)" => "$0", "^/(admin|install).*$" => "$0", "^/([^/\.]+)/?(?:\?(.*))$" => "index.php?page=$1&$2", "^/([^/\.]+)/?$" => "index.php?page=$1", "^/([^/\.]+)/([^/]+)/?(?:\?(.*))$" => "index.php?page=$1&id=$2&$3", "^/([^/\.]+)/([^/]+)/?$" => "index.php?page=$1&id=$2", "^/([^/\.]+)/([^/]+)/([^/]+)/?$" => "index.php?page=$1&id=$2&subpage=$3" ) } $SERVER["socket"] == "192.168.1.11:8085" { server.document-root = "/mnt/cache/www/owncloud/" } $SERVER["socket"] == "192.168.1.11:8086" { server.document-root = "/mnt/cache/www/spotweb/" url.rewrite-once = ( "^/api\?(.*)" => "/index.php?page=newznabapi&$1" ) } Quote Link to comment
peter_sm Posted December 26, 2012 Share Posted December 26, 2012 Thanks will try this! But what settings do you have in following ? SF Web root directory: ? newznab: Server Root: * Set in simpleFeatures web server plug-in! ? //Peter Quote Link to comment
Helmonder Posted December 26, 2012 Share Posted December 26, 2012 Thanks will try this! But what settings do you have in following ? SF Web root directory: ? newznab: Server Root: * Set in simpleFeatures web server plug-in! ? //Peter SF Web root directory: /mnt/cache/www/main There is no web root for newznab in the simplefeatures web server plugin, newznab is reachable at http://192.168.1.11:8084/ The webroot in the plugin is the one for "main", for me this is the dir I place a simple index.html in that links to all services I have running on the system. Quote Link to comment
peter_sm Posted December 26, 2012 Share Posted December 26, 2012 Ok, but using your lighttpd.cfg I can start the web server, below is my modified SF web server : /mnt/cache/www/main/ Port: 81 In /mnt/cache/www.... is below 3 folders main/ newznab/ spotweb/ Should they belong to nobody ? # User customizations # Add your own settings here. These won't get overwritten upon reboot ## Abdd your own settings here. These won't get overwritten upon reboot # $SERVER["socket"] == "192.168.0.199:8084" { server.document-root = "/mnt/cache/www/newznab/www/" url.rewrite-once = ( "^/.*\.(css|jpg|jpeg|gif|png|js|ico)" => "$0", "^/(admin|install).*$" => "$0", "^/([^/\.]+)/?(?:\?(.*))$" => "index.php?page=$1&$2", "^/([^/\.]+)/?$" => "index.php?page=$1", "^/([^/\.]+)/([^/]+)/?(?:\?(.*))$" => "index.php?page=$1&id=$2&$3", "^/([^/\.]+)/([^/]+)/?$" => "index.php?page=$1&id=$2", "^/([^/\.]+)/([^/]+)/([^/]+)/?$" => "index.php?page=$1&id=$2&subpage=$3" ) } $SERVER["socket"] == "192.168.0.199:8085" { server.document-root = "/mnt/cache/www/disk/" } $SERVER["socket"] == "192.168.0.199:8086" { server.document-root = "/mnt/cache/www/spotweb/" url.rewrite-once = ( "^/api\?(.*)" => "/index.php?page=newznabapi&$1" ) } Quote Link to comment
peter_sm Posted December 26, 2012 Share Posted December 26, 2012 never mind it was the disk folder that cause error, I have removed this and the settings in the cfg file, now is it running //Petre Quote Link to comment
jangjong Posted December 26, 2012 Share Posted December 26, 2012 good. if you use $SERVER["socket"] option, you should be able to assign any ports you want to an web app that gets installed under simplefeature web server. so much easier for the rewrite rule as well because you can assign rewrite rule to each sockets and not worry about it conflicting with any other app. Quote Link to comment
Helmonder Posted December 28, 2012 Share Posted December 28, 2012 good. if you use $SERVER["socket"] option, you should be able to assign any ports you want to an web app that gets installed under simplefeature web server. so much easier for the rewrite rule as well because you can assign rewrite rule to each sockets and not worry about it conflicting with any other app. Yes, this is a very welcome thing I have learned ! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.