Admin Panel Broken



  • hi, all the link in the admin page are not working after updating to version v.1.12.1.
    all the link become mydomain.com/admin#.; whereas, the main page works as usual. All the emoji plugin and editing tool are broken as well.

    error.png



  • Does anyone have any idea on this? I cannot find any error in log file. all the link become mydomain.com/admin#. User visiting data is not showing. Search tool is not working either.


  • Global Moderator

    @Kinchtwck have you tried rebuilding and restarting? Reinstalling npm modules? What version etc are you on?


  • Community Rep

    Any luck after the rebuild?



  • @PitaJ I did, I tried multiple times, rebuilt and restarted nodebb and Nginx. I even tried to reinstall nodebb and connect to the original database. I wonder if it's the issue with my nginx setting. I am on node -v10.15.3 , npm 6.9

         error_log /var/log/nginx/error.log crit;
         
         events{
         
                 #worker_connections 4000;
         
                 }
         
         http{
         
         server {
                  listen       80;
                 server_name  myurl.com;
         	return 302 https://$server_name$request_uri;
               }
         
         
         server {
             listen 443;
             ssl on;
             ssl_certificate /etc/nginx/ssl/cert_chain.crt;        
             ssl_certificate_key /etc/nginx/ssl/private.key;    
             server_name myurl.com;
          
         
           location / {
         
         
                 proxy_pass         http://127.0.0.1:8080;
                 proxy_set_header   Host $host;
                 proxy_set_header   X-Real-IP $remote_addr;
                 proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
                 proxy_set_header   X-Forwarded-Host $server_name;
                 proxy_set_header X-Forwarded-Proto $scheme;
                 proxy_set_header Host $http_host;
                 proxy_set_header X-NginX-Proxy true;
         
                 proxy_redirect off;
         
                 # Socket.IO Support
                 proxy_http_version 1.1;
                 proxy_set_header Upgrade $http_upgrade;
                 proxy_set_header Connection "upgrade";
                 }
         
                 gzip on;
                 gzip_vary on;
                 gzip_min_length 10240;
                 # gzip_proxied expired no-cache no-store private auth;
                 gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml;
                 gzip_disable "MSIE [1-6]\.";
         
             }
         }
    

    Below is the config.json

    {
        "url": "myurl",
        "secret": "secret",
        "database": "mongo",
        "port": [
            "4567",
            "4568",
            "4569"
        ],
        "mongo": {
            "host": "127.0.0.1",
            "port": "27017",
            "username": "username",
            "password": "pass",
            "database": "db",
            "uri": ""
        }
    }

  • Community Rep

    @Kinchtwck seems fine, but no socket.io config?


  • Community Rep

    @Kinchtwck said in Admin Panel Broken:

    proxy_pass http://127.0.0.1:8080;

    Load balancer?


  • Global Moderator

    @scottalanmiller the socket.io config is not necessary. Your recommendation of using *:* puts people at risk of cross-site websocket attacks. Nobody should need that configuration option unless they want to use multiple domains with the same NodeBB, in which case they should list the two URLs directly.

    More information here: https://community.nodebb.org/topic/13388/faq-websockets-not-working-due-to-misconfigured-origins



  • @scottalanmiller the nodebb is running on 8080. For reason I don' know, the nodebb always runs on port 8080 despite the setting in config.json.


  • Admin

    That's a little odd, it doesn't sound like you're running a regular VPS then, if you can't control the port? What service are you using?



  • @julian I am nodebb running on aws with nginx


  • Global Moderator

    Here's the example config from our docs:

    server {
        listen 80;
    
        server_name forum.example.org;
    
        location / {
            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";
        }
    }
    

    Here's yours:

    server {
    
      listen 443;
      ssl on;
      ssl_certificate /etc/nginx/ssl/cert_chain.crt;        
      ssl_certificate_key /etc/nginx/ssl/private.key;    
      server_name myurl.com;
    
      location / {
    
        proxy_pass       http://127.0.0.1:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Host $server_name;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Host $http_host;
        proxy_set_header X-NginX-Proxy true;
    
        proxy_redirect off;
    
        # Socket.IO Support
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    
      }
    
      gzip on;
      gzip_vary on;
      gzip_min_length 10240;
      # gzip_proxied expired no-cache no-store private auth;
      gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml;
      gzip_disable "MSIE [1-6]\.";
    
    }
    

    Firs of all, I'd try to get your forum working with the minimum amount of stuff. Try disabling SSL and gzip and all of the other extraneous stuff there, and ensure that all of the proxy operations are typed correctly and in the same order as the example config.

    Please also share any errors you encounter client-side or server-side when running or building nodebb. Remove the port section from your config.json since you obviously aren't using it.

    Make sure you are neither installing nor running nodebb with root privileges.



  • @PitaJ The problem is that I am not able to view the site since Google prohibits user visiting site without https. Thanks for the suggestion, I'll delete the gzip and see how it goes. What makes it harder to debug is that the log doesn't show up any error.


  • Global Moderator

    @Kinchtwck Google absolutely does not do that, what are you talking about? Try a different browser or something.


  • Community Rep

    @Kinchtwck said in Admin Panel Broken:

    @scottalanmiller the nodebb is running on 8080. For reason I don' know, the nodebb always runs on port 8080 despite the setting in config.json.

    If you are still working on getting NodeBB to run on the correct port as specified by the config file, why do you have the file set to three ports? Start with just getting one working, as only one is working anyway.


  • Community Rep

    @julian said in Admin Panel Broken:

    That's a little odd, it doesn't sound like you're running a regular VPS then, if you can't control the port? What service are you using?

    VPS by definition couldn't cause that problem. A VPS you'd always be able to control the port.


  • Community Rep

    @Kinchtwck said in Admin Panel Broken:

    What makes it harder to debug is that the log doesn't show up any error.

    What does netstat -tulpn tell us when you clean up the ports list and restart NodeBB?


  • Admin

    @scottalanmiller Yes indeed, that's why I said it doesn't sound like it was a VPS 😄

    Sadly we're fairly limited in terms of AWS experience, so I can't really help there...


  • Community Rep

    @julian said in Admin Panel Broken:

    Sadly we're fairly limited in terms of AWS experience, so I can't really help there...

    Nothing to know there. AWS is "just a server" like any other. That AWS does the hosting doesn't change things at the OS level. It's the same as a physical server.



  • @PitaJ I tried only initiate without SSL but the result was the same


Log in to reply
 

Suggested Topics

| |