Uberspace / lab

The Uberlab provides various tutorials - written by you! - on how to run software and tools on Uberspace 7.
https://lab.uberspace.de
Other
309 stars 412 forks source link

Shaarli guide doesn’t work for me #1572

Open manu-cyber opened 1 year ago

manu-cyber commented 1 year ago

Hi, I’m having problems with the Shaarli guide, but I can’t figure out what’s going wrong.

I’m on wirtanen (Uberspace 7.15.3, PHP 8.0) and trying to install Shaarli v0.12.2. I made sure the web domain has been added to the list and that I’m working in the right directory.

After putting the files into the directory and opening the URL, I do get redirected to /install, but it shows me a HTTP 500 error code. The Apache error log gives me the following when calling the URL:

AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

I don’t think I can change the log level here to get more details. If I can, please let me know how.

I briefly looked into the .htaccess and tried using the given alternative method to forward the HTTP authorization header (uncommented the last line, commented the two other ones), but to no avail:

# Forward the "Authorization" HTTP header
# fixes JWT token not correctly forwarded on some Apache/FastCGI setups
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
# Alternative (if the 2 lines above don't work)
# SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0

Shaarli’s troubleshooting section from the documentation [0] only mentions browser-related issues associated with referals. Neither do I have the config set to the values that may cause issues, nor does it work in a browser with another rendering engine.

At this point I’m running out of ideas so I would be happy if some of y’all can give me some pointers and/or help me fix the guide, if it’s a universal issue.

Cheers!

[0] https://shaarli.readthedocs.io/en/master/Troubleshooting/

manu-cyber commented 1 year ago

I had another go today. It seems to kinda work when I’m not using URL rewriting and directly access shaarli.myurl.com/index.php/, as described here: https://shaarli.readthedocs.io/en/master/Server-configuration/#using-shaarli-without-url-rewriting

After finishing the installation I can see the page via shaarli.myurl.com, but if I try to login there I still get the 500 error and have to use /index.php/ instead. Even after setting the root_url as described in the documentation I linked.

I’m completely clueless in regards to webserver configuration, but I still think there should be something I can modify in the .htaccess to fix the URL rewriting.

EDIT: For reference, Shaarli’s .htaccess can be found here: https://github.com/shaarli/Shaarli/blob/master/.htaccess

manu-cyber commented 1 year ago

sigh I really wanted to go to bed, but now I found a solution. I uncommented the following line in the .htaccess, and rewriting seems to work properly now.

# Ionos Hosting needs RewriteBase /
RewriteBase /

Would there be any reason not to add this to the guide? Otherwise I’d be happy to add it.

Good night everyone.

Systemsemaphore commented 1 year ago

Would there be any reason not to add this to the guide? Otherwise I’d be happy to add it.

This article: https://blog.uberspace.de/die-sache-mit-den-virtuellen-documentroots/

And this line from the Uberlab style guide:

Don't mention additional document roots. Keep it simple. Don't use subfolders. Always use the standard document root ~/html. Always assume the document root is empty.

I've received numerous inquiries from various users concerning the Shaarli guide. However, I'm unsure about how to improve the guide and make it easier to follow without violating the style guide. Omitting essential details regarding URL rewriting could potentially burden the support team with additional work. Similarly, incorporating information about URL rewriting might result in a similar outcome. That's why I'd like to hear what the Uberspace team has to say on this matter.

Edit: See #920 as well

EV21 commented 1 year ago

@manu-cyber It looks the same as the Nextcloud URL rewriting does, so I think you can add a short tuning section. If it is required to do these changes to prevent issues like you mentioned before you may instead add this as a required part to the installation and upgrade steps.