Spotweb Module anyone?? News index php/web


Recommended Posts

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.

Link to comment
  • Replies 72
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

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

Link to comment

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 !

Link to comment

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

 

Link to comment

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

Link to comment

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 ?

Link to comment

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?

Link to comment

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

 

 

Link to comment

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 ..

Link to comment

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"

 

Link to comment

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 ...

Link to comment

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.

Link to comment

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" 
)
}

Link to comment

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.

Link to comment

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"
        )
}

Link to comment

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.

Link to comment

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 ! 

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.