500 Internal Server Error | nginx

,

Bonjour, lors de l’utilisation du serveur, j’ai eu un message d’erreur dans l’interface utilisateur m’empêchant d’utiliser mon serveur.

Description du serveur :

  • J’utilise un vieil ordinateur
  • La version de YunoHost est 3.7.1.1 (dernière version)
  • J’ai accès à mon serveur par webadmin, physiquement et par SSH

Lorsque je me rends sur l’interface utilisateur, j’ai un message d’erreur qui apparait intantanément :

500 Internal Server Error | nginx

J’ai fait beaucoup de recherches sur le sujet mais je n’ai rien trouvé de concluant.

Merci d’avance pour votre aide.
ogamache

==============================================================================

Hello, during the use of my server, I got an error message in the user interface preventing me from using my server.

Description of the server :

  • I’m using an old computer
  • The version of YunoHost is 3.7.1.1 (latest version)
  • I have access to my server by webadmin, physically and by SSH

When I go to the user interface, I get an error message that appears immediately :

500 Internal Server Error | nginx

I’ve done a lot of research on the subject but I haven’t found anything conclusive.

Thank you in advance for your help.
ogamache

Can you elaborate on which apps are installed and/or what url exactly you’re trying to access ?

Hi there @Aleks, thank you for answering this fast.

Currently, I am not using any app when this error occurs, when I try to get on my domain, I am having this error.

To conclude, I am only trying to go on the root of my domain and I get 500 Internal Server Error.

By the way, if you want to try and see my website by yourself, my domain is https://diguidou.tk/.

Could it be that you have a setting or addon that suppresses browser’s refferer ?

No, I don’t think that’s the problem because I also tried it on my mobile phone’s built-in web browser and I still had the problem and I don’t have any addons that is doing this.

Hmokay … Well I guess we gonna have to look into ls -thor /var/log/nginx/ after triggering the issue, then remember the 1 or 2 most recently modified files at the bottom, then tail -n 50 /var/log/nginx/<thatfilename>

Or possibly add 'logging':'debug' into /etc/ssowat/conf.json.persistent (assuming you’re comfortable with editing json files), maybe systemctl relod nginx and check if there anything showing up in /etc/nginx/ssowat.log :confused:

Honestly, I don’t really know how to work with .json files :sweat_smile: , but I entered the commands in the command prompt but I don’t really know what to do with this.

Uh yeah well, if you can share what returns the tail commands they might contain some clue of what’s happening … Possibly using https://paste.yunohost.org

A post was split to a new topic: [Pleroma] Error 500 / invalid credentials

Hey there, sorry for the delay. Here is the access.log :
https://paste.yunohost.org/noraqoloba.coffeescript

Hmokay, did any other logs got recently modified in ls -thor /var/log/nginx ? (any of these ending with -error.log ? )

Yes here it is (also the others) :

  • diguidou.tk-error.log : https://paste.yunohost.org/abadukewuz.vbs
  • diguidou.tk-access.log : https://paste.yunohost.org/oyedujiqoq.sm
  • access.log : https://paste.yunohost.org/ojuhuqaqux.pl

Uh wokay that’s indeed a bug here in Yunohost :

Variable user is not defined … And apparently I’m the culprit xD The whole part starting at “Cross-domain” sounds completely nonsense and shouldn’t be there …

Yet I don’t really understand why we didnt spot this earlier … Or why it only happens to you …

Could it be that you changed some stuff manually in ssowat’s conf ? Do you have more info about when exactly this started happening ?

2 Likes

Well I never manually changed a thing in the ssowat’s config. Also, I just installed it and it was already not working at all.

Hmokay … So if you have a bit more of patience i’d like to see really if removing the faulty part does solve the issue entirely …

Can you try to open the file with ‘sudo nano /usr/share/ssowat/access.lua

then go down to line 77 to find something like :

        -- Force portal scheme
        if ngx.var.scheme ~= conf["portal_scheme"] then
            logger.debug("Redirecting to "..conf.portal_url.."Cross-domain authentication: "..user.." connected on "..ngx.var.host)
            return hlp.redirect(conf.portal_url)
        end

and change the logger.debug line such that it’s only :

logger.debug("Redirecting to "..conf.portal_url)

Reload nginx with systemctl reload nginx and try to re-access your yunohost sso ? :s

1 Like

Great! So I made the change but I now have a redirection issue :confused:
Google Chrome says that the was too much redirections while loading the website

Edit: I resolved the problem with my TLS/SSL settings. Now, Its working!
Thank you very much @Aleks!

Ah ? xD Can you elaborate on what was the problem ? o.O

Sure!
I couldn’t get access to the server because of redirection problems, so I changed the certificate encryption mode from Flexible to Full.

(This got fixed upstream in SSOwat 3.7.1.1)

1 Like

@ogamache, @Aleks
Hello,

It seems I’m facing exactly the same issue.
What is the best way to fix it ?
Change myself the file /usr/share/ssowat/access.lua or can we expect a more official fix soon ?

Thank you all for your help…