How to put the Forums in a directory instead of homepage
-
Doesn't work. If I go to forums.com I get:
internal error
/
misconfigured csrfAnd if I go to forums.com/forums I get:
/forumscategories not found. -
If using Nginx, you also need
location /forums/ { }
withproxy_pass
, etc. See NginX - NodeBB Documentation. -
Ok Forums.com/forums works. And I see the Nginx homepage for forums.com. How do I edit the homepage with html?
-
Well, you can have anything as the homepage. For example, a Ghost blog that can integrate with NodeBB for comments. However, if you prefer just a static index.html file, see NGINX Docs | Serving Static Content, or as an example nginx config for static site.
-
Do I make a new file in sites-available with the new configuration. Or just add to the Forums.com one
-
Probably you have a line like:
include /etc/nginx/sites-enabled/*;
in /etc/nginx/nginx.conf. So you can choose to have the configuration in one or several files. Maybe in this case it's simpler to add it to the existing file in sites-available, that will already have a symlink in sites-enabled.
-
The
include
line? Probably it's already there. It just means that all files or symlinks in sites-enabled will be included as Nginx configuration.Your site config (in the other file we mentioned) probably will be something like:
server { ... location /forums/ { ... } location / { ... } }
-
It was already in Nginx.conf. Now when I go to Forums.com I get error 500 internal server error
-
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; }
}