How to put the Forums in a directory instead of homepage
Solved
General Discussion
-
server {
listen 80;index index.html index.htm; server_name wowbad.ml; location /forums/ { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://127.0.0.1:4567; proxy_redirect off; # Socket.IO Support proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } location / { default_type "text/html"; try_files $uri.html $uri/ /index.html; }
}
-
There is another possible problem:
@whimpers said in How to put the Forums in a directory instead of homepage:
try_files $uri.html $uri/ /index.html;
It looks like this line can cause that error if
/index.html
can't be accessed, maybe because of permission or owner problems, if theroot
line is correct.Since
index.html
is already inindex
, you can try something simpler like:try_files $uri $uri/ =404;
This will give a 404 not found until you fix the permissions problem. Try
chmod 777 index.html
(from its folder) to see if this is the case. Then change the owner (probably a user sharing a group with thewww-data
user mentioned in nginx.conf) to be able to use the safer664
. -
This post is deleted!
Copyright © 2024 NodeBB | Contributors