Coder Social home page Coder Social logo

Lighttpd about selfoss HOT 14 CLOSED

fossar avatar fossar commented on May 26, 2024
Lighttpd

from selfoss.

Comments (14)

SSilence avatar SSilence commented on May 26, 2024

Hi,

you have define the rewrite conditions in your lighttpd configuration for the selfoss installtion. Base on the rsslounge lighttpd definition I wrote this:

url.rewrite-once = (
"^/selfoss/favicon.ico$" => "/selfoss/public/favicon.ico",
"^/selfoss/favicons/(.)$" => "/selfoss/data/favicons/$1",
"^/selfoss/thumbnails/(.
)$" => "/selfoss/data/thumbnails/$1",
"^/selfoss/public/" => "$0",
"^/selfoss/(.*)" => "/selfoss/index.php?$1"
)

I didn't test this. If this works then please give me a short feedback!

Regards
Tobi

from selfoss.

ldane avatar ldane commented on May 26, 2024

I added one more line.

url.rewrite-once = (
"^/favicon.ico$" => "/public/favicon.ico",
"^/favicons/(.)$" => "/data/favicons/$1",
"^/thumbnails/(.
)$" => "/data/thumbnails/$1",
"^/public/" => "$0",
"^.(js|ico|gif|jpg|png|css|asc|txt|eot|woff|ttf|svg)$" => "public/$0",
"^/(.
)" => "/index.php?$1"
)

Now I'm getting error while adding source. Whenever I change the source type, it says "Bad Request".

from selfoss.

SSilence avatar SSilence commented on May 26, 2024

Sadly I have no lighttpd instance here for testing. Have you solved the problem? I think it could be a problem with the / in the post parameters.

from selfoss.

ldane avatar ldane commented on May 26, 2024

No, I'm not able to fix this problem. The request:

GET https://news.verj.us/source/params?spout=spouts%5Crss%5Cfeed

400 Bad Request

Response:
no spout type given

Can you help me to solve this problem?

from selfoss.

polohb avatar polohb commented on May 26, 2024

Hi all, I 've done things in the same way in my lighttpd.conf

url.rewrite-once += (
"^/selfoss/favicon.ico$" => "/selfoss/public/favicon.ico",
"^/selfoss/favicons/(.)$" => "/selfoss/data/favicons/$1",
"^/selfoss/thumbnails/(.
)$" => "/selfoss/data/thumbnails/$1",
"^/selfoss/public/" => "$0",
"^/selfoss/(..(js|ico|gif|jpg|png|css|asc|txt|eot|woff|ttf|svg))$" => "/selfoss/public/$1",
"^/selfoss/(.
)" => "/selfoss/index.php?$1"
)

No more pb for css, no pb during importation via ompl.

But if i want to add some new feed via "add source function" i have a bad request like this :

add_source_error

from selfoss.

SSilence avatar SSilence commented on May 26, 2024

I think I fixed the problem. Currently I have no lighttpd installation available but I think my last commit should solve the problem. Please update

controllers/Sources.php
with
https://raw.github.com/SSilence/selfoss/master/controllers/Sources.php

and
templates/source.phtml
with
https://raw.github.com/SSilence/selfoss/master/templates/source.phtml

from selfoss.

polohb avatar polohb commented on May 26, 2024

I have still the same error after changing this 2 files, just have one new line for ompl import ;)
add_source_error2

For information i have the 2.2 stable version, maybe i should get to the git version for testing such things, no ?
I have now picked up the git version, to help testing such things for lighttpd ;)

from selfoss.

SSilence avatar SSilence commented on May 26, 2024

Yes, the easiest way is to use the git version. I have forgotten: You have to delete public/all.js and should clear your browsercache. Thanks a lot for testing!!

from selfoss.

polohb avatar polohb commented on May 26, 2024

Hi guys I think I found the rewrite problem for lighttpd.
There were no rules to redirect "query string"
Here is the one I have added -> "^/selfoss/([^\?]+)(?(.))?" => "/selfoss/index.php?$3"
I have also added one more rule to prevent index.php? be redirected by the previous one "^/selfoss/index.php(.
)$" => "$0",

So lighttpd.conf file for selfoss should be something like this if you have selfoss installed like me in a subdirectory of your server.

url.rewrite-once += (
"^/selfoss/favicon.ico$" => "/selfoss/public/favicon.ico",
"^/selfoss/favicons/(.)$" => "/selfoss/data/favicons/$1",
"^/selfoss/thumbnails/(.
)$" => "/selfoss/data/thumbnails/$1",
"^/selfoss/(..(js|ico|gif|jpg|png|css|asc|txt|eot|woff|ttf|svg))$" => "/selfoss/public/$1",
"^/selfoss/index.php(.
)$" => "$0",
"^/selfoss/([^\?]+)(?(.))?" => "/selfoss/index.php?$3",
"^/selfoss/public/" => "$0",
"^/selfoss/(.
)" => "/selfoss/index.php?$1"
)

If it's working for you, I think I will update https://github.com/SSilence/selfoss/wiki/Lighttpd-configuration to have a correct config file.

from selfoss.

ldane avatar ldane commented on May 26, 2024

It's working for me.
Thanks.

from selfoss.

SSilence avatar SSilence commented on May 26, 2024

Cool, thanks for the fixed configuration!

from selfoss.

SSilence avatar SSilence commented on May 26, 2024

It seems a problem exists with logout. Can you test this configuration which allows logging out?

url.rewrite-once += (
"^/selfoss/favicon.ico$" => "/selfoss/public/favicon.ico",
"^/selfoss/favicons/(.)$" => "/selfoss/data/favicons/$1",
"^/selfoss/thumbnails/(.
)$" => "/selfoss/data/thumbnails/$1",
"^/selfoss/(..(js|ico|gif|jpg|png|css|asc|txt|eot|woff|ttf|svg))$" => "/selfoss/public/$1",
"^/selfoss/index.php(.
)$" => "$0",
"^/selfoss/([^\?])(?(.))?" => "/selfoss/index.php?$3",
"^/selfoss/public/" => "$0",
"^/selfoss/(.*)" => "/selfoss/index.php?$1"
)

from selfoss.

fedxa avatar fedxa commented on May 26, 2024

This one works for me :) I've just made the same suggestion in the 'Logout button' issue :)

from selfoss.

polohb avatar polohb commented on May 26, 2024

It's seem that the "query_string rewrite"
"^/selfoss/([^\?])(?(.))?" => "/selfoss/index.php?$3",
doesn't match the logout parttern.

So you can just add this next rewrite for logout working properly.
"^/selfoss/?logout=1" => "/selfoss/index.php?logout=1",

from selfoss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.