• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

Which file to edit when getting rid of the 4567 port number?

Scheduled Pinned Locked Moved Technical Support
12 Posts 5 Posters 4.4k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Zig.gyZ Offline
    Zig.gyZ Offline
    Zig.gy Translator
    wrote on last edited by
    #1

    0_1449501844477_Nginx Support Post 1.PNG
    0_1449501856483_Nginx Support Post 2.PNG

    (Excuse the inconvenience the screenshots may cause. My original post was rejected by Akismet before I found out why)

    1 Reply Last reply
    0
  • yariplusY Offline
    yariplusY Offline
    yariplus Community Rep
    wrote on last edited by
    #2

    The nginx conf.d and http.d are optional, mine are completely empty.

    Have you changed the URL in NodeBB's config.json? It should be the full address of the forum. e.g. http://forum.example.com/

    Zig.gyZ 1 Reply Last reply
    0
  • JaredBuschJ Offline
    JaredBuschJ Offline
    JaredBusch GNU/Linux
    wrote on last edited by
    #3

    If you are standing NginX up on the box, you have no reason to change the NodeBB port.

    You can just have NginX proxy it.

    The users will never see the port.

    1 Reply Last reply
    0
  • JaredBuschJ Offline
    JaredBuschJ Offline
    JaredBusch GNU/Linux
    wrote on last edited by JaredBusch
    #4

    Here is all you have to put in your serever config for NginX

    404 Not Found

    favicon

    (docs.nodebb.org)

    Edit: Looking at your screenshots closer, I see this link. So the point you are missing is that nothing here is changing NodeBB. NodeBB always runs on 4567 in this case.

    Zig.gyZ Mawi RauraM 2 Replies Last reply
    0
  • JaredBuschJ Offline
    JaredBuschJ Offline
    JaredBusch GNU/Linux
    wrote on last edited by JaredBusch
    #5

    I do not edit nginx core conf files, instead I added a conf file in conf.d

    This is my proxy setup for my nodeBB instance. My nodeBB is only another VM instead of on the same as NginX, so I have a internal IP listed in there for the redirect instead of 127.0.0.1 loopback.

    # /etc/nginx/conf.d/obelisk.daerma.com.conf
    
    server {
        client_max_body_size 40M;
        listen 443 ssl;
        server_name obelisk.daerma.com;
        ssl          on;
        ssl_certificate /etc/letsencrypt/live/daerma.com/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/daerma.com/privkey.pem;
        ssl_stapling on;
        ssl_stapling_verify on;
        add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
    
        location / {
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Host $http_host;
            proxy_set_header X-NginX-Proxy true;
            proxy_pass http://10.254.0.106:4567;
            proxy_redirect off;
    
            # Socket.IO Support
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
    
        }
    }
    server {
        client_max_body_size 40M;
        listen 80;
        server_name obelisk.daerma.com;
        rewrite        ^ https://$server_name$request_uri? permanent;
    }
    
    1 Reply Last reply
    0
  • Zig.gyZ Offline
    Zig.gyZ Offline
    Zig.gy Translator
    replied to yariplus on last edited by Zig.gy
    #6

    @yariplus : I had done that long time ago 😄 In other words, that is how I have been running the existing set up with the port.

    So, I have the url as <mysite>.com

    1 Reply Last reply
    0
  • Zig.gyZ Offline
    Zig.gyZ Offline
    Zig.gy Translator
    replied to JaredBusch on last edited by
    #7

    @JaredBusch : even for the links you see, when you click on one, you get 404 error. So they lead to no where really

    1 Reply Last reply
    0
  • yariplusY Offline
    yariplusY Offline
    yariplus Community Rep
    wrote on last edited by
    #8

    Check if the nginx.conf is actually reading the conf files. Some repos don't include them.

    For example, I just installed from the Digital Ocean repo, and it didn't include sites-available or conf.d, I had to add the lines myself. It also had a server block for port 80 that routed everything to a blank page, which I removed.

    include /etc/nginx/sites-enabled/*;

    I doubt this is your particular problem, but others might find it useful.

    Zig.gyZ 1 Reply Last reply
    0
  • Zig.gyZ Offline
    Zig.gyZ Offline
    Zig.gy Translator
    replied to yariplus on last edited by
    #9

    @yariplus: Right now I can be able to reach Nginx's default page when I type another URL other that containing NodeBB.

    My question specifically is where I paste the server block that is on the NodeBB's help page. I had opened my file in the sites-available directory and then added it in the server block. Is this what you did too?

    yariplusY 1 Reply Last reply
    0
  • yariplusY Offline
    yariplusY Offline
    yariplus Community Rep
    replied to Zig.gy on last edited by yariplus
    #10

    @Zig.gy Yes.

    I have one file in sites-available, /etc/nginx/sites-available/yaricraft and it contains exactly what's in the NodeBB docs. And that file is aliased into sites-enabled.

    tbh, it looks like you did everything right with nginx, since it's serving the correct page. Which is why my first guess was your nodebb config.

    1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #11

    If you're using the sites-enabled folder, then it is perfectly acceptable to leave conf.d/ empty.

    Can you paste your nginx config here?

    1 Reply Last reply
    0
  • Mawi RauraM Offline
    Mawi RauraM Offline
    Mawi Raura
    replied to JaredBusch on last edited by
    #12

    @JaredBusch said:

    Here is all you have to put in your serever config for NginX

    404 Not Found

    favicon

    (docs.nodebb.org)

    Edit: Looking at your screenshots closer, I see this link. So the point you are missing is that nothing here is changing NodeBB. NodeBB always runs on 4567 in this case.

    I think i have this same problem, how do i make it listen on 80?

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development