Good morning/night/evening/the time for you right now, ever since I set up Snikket, my web pages other than Snikket’s have been displaying nginx 404 not found errors. I can access the website locally but when I go to the domain name it pops up the error. When I go to localhost:443 it also shows the nginx not found 404 thing so I think that’s where my other website pages are getting the error from, but I never port fowarded port 443, at least I don’t think so. I use the standard nginx reverse proxy for Snikket, and Nginx Proxy Manager for my other web pages. I really hope someone can help me. Thank you very much in advance.

  • selfhostingpersonOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 hours ago

    nginx proxy manager’s in a docker container reverse proxying my nginx docker containers, and native nginx is reverse proxying snikket container because nginx proxy manager doesn’t go well with snikket.

    Here’s the nginx config for my snikket.

    server {                                                          # Accept HTTP connections                                       listen 80;
      listen [::]:80;
    
      server_name chat.allinuxuser.xyz;
      server_name groups.chat.allinuxuser.xyz;
      server_name share.chat.allinuxuser.xyz;
                                                                      location / {                                                        proxy_pass http://localhost:5080/;                              proxy_set_header      Host              $host;
          proxy_set_header      X-Forwarded-For   $proxy_add_x_forwarded_for;
                                                                          # This is the maximum size of uploaded files in Snikket
          client_max_body_size 104857616; # 100MB + 16 bytes          }
    }                                                                                                                               server {                                                          # Accept HTTPS connections
      listen [::]:443 ssl;                                            listen 443 ssl;
      ssl_certificate /etc/letsencrypt/live/allinuxuser.xyz-0001/fullchain.pem;                                                       ssl_certificate_key /etc/letsencrypt/live/allinuxuser.xyz-0001/privkey.pem;
                                                                      server_name chat.allinuxuser.xyz;                               server_name groups.chat.allinuxuser.xyz;
      server_name share.chat.allinuxuser.xyz;                       
      location / {
          proxy_pass https://localhost:5443/;
          proxy_set_header      Host              $host;
          proxy_set_header      X-Forwarded-For   $proxy_add_x_forwarded_for;
          # REMOVE THIS IF YOU CHANGE `localhost` TO ANYTHING ELSE ABOVE
          proxy_ssl_verify      off;
          proxy_set_header      X-Forwarded-Proto https;
          proxy_ssl_server_name on;
    
          # This is the maximum size of uploaded files in Snikket
          client_max_body_size 104857616; # 100MB + 16 bytes
    
          # For BOSH and WebSockets
          proxy_set_header Connection $http_connection;
          proxy_set_header Upgrade $http_upgrade;
          proxy_read_timeout 900s;
    
      }
    }
    

    Here’s the docker-compose for one of the sites i’m running that’s been affected by the weird nginx error.

    version: "3"                                                    services:
        client:                                                           image: nginx
          restart: unless-stopped                                         ports:
                - 5973:80                                                 volumes:
                - ./allinuxuser-website:/usr/share/nginx/html
    

    Please tell me if there’s any more logs I need to provide.

    • JASN_DE@feddit.org
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 hours ago

      So your native nginx process covers ports 80 and 443. which ports does your NPM use? Are you trying to use the same ports? Because that’ll most likely clash.

      • selfhostingpersonOP
        link
        fedilink
        English
        arrow-up
        1
        ·
        10 hours ago
        services:
          app:
            image: 'jc21/nginx-proxy-manager:latest'                        restart: unless-stopped
            ports:                                                            - '325:80'
              - '81:81'                                                       - '326:443'
            volumes:                                                          - ./data:/data                                                  - ./letsencrypt:/etc/letsencrypt
        

        I mean I got them portmapped to other ports so… I dunno