Flameborn / Kiramoji

Kiramoji is a modified version of the popular anonymous message board: Kareha.
25 stars 3 forks source link

Nginx issue #4

Open 153 opened 11 months ago

153 commented 11 months ago

This is a bug I'm facing

I am able to view and use the perl scripts in Nginx with the following code block:

location ~ \.pl$ {
  try_files $uri $uri/ index.html;
  include fastcgi_params;
  fastcgi_pass unix:/var/run/fcgiwrap.socket;
  fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

however trying to access URLs such as /test/kareha.pl/1697812648/ render a 404 error

I actually got this in Kareha because trying to run Kiramoji gives me this error:

Bareword "ATOM_FILE" not allowed while "strict subs" in use at /test/kiramoji.pl line 271, <FILE> line 4.

... however I assume that the solution to this applies to karamoji and kareha users alike :)

153 commented 11 months ago

Also I commented out the line saying "use strict" and now I get error message Undefined subroutine &main::ATOM_TEMPLATE called at /test/kiramoji.pl line 271.

This is for mode_image btw. It looks as though mode_message would support ATOM_TEMPLATE per https://github.com/search?q=repo%3AFlameborn%2FKiramoji%20atom_template&type=code

Flameborn commented 11 months ago

I am unfortunately not familiar enough with Nginx to investigate what the issue might be at this time.

A 404 usually means that Kiramoji is not receiving the rest of the URL as parameters, and Nginx is likely looking for a file on disk.

While the image mode did not receive as much love in the Kiramoji fork of Kareha and thus it's slightly outdated, I would love to fix this once Nginx cooperates.

153 commented 11 months ago

Solved https://4-ch.net/tech/kareha.pl/1697813389/4

@Flameborn try setting up a new board with mode_image , do you also get an error?

Flameborn commented 11 months ago

Awesome. For the record, could you please provide your working Nginx config? Perhaps I could add it as an example similarly to Caddy2.

Also, is there something we should change on Kiramoji's side, or did it end up being an Nginx issue only?