this post was submitted on 11 Aug 2024
1 points (100.0% liked)

nginx

4 readers
1 users here now

The nginx community on Reddit. Reddit gives you the best of the internet in one place.

founded 1 year ago
MODERATORS
 
The original post: /r/nginx by /u/odhiambo0 on 2024-08-11 11:13:49.

Hello everyone,

I am very new to Nginx so bear with me. I have a situation where I cannot load my site because Nginx is looking for files in the wrong directory. 5 days of digging has yielded nothing substantial. The site - mm3-lists.kictanet.or.ke - is public. You can try and access it and see the mess Nginx is causing :(

The problem: I need to serve static files from /opt/mailman/mm/static/. For some very strange reason, Nginx is trying to serve the files from a completely different and non-existent path - /usr/share/nginx/html/static/hyperkitty/ - as shown in the logs below.

For the record, my /etc/nginx/nginx.conf is by all means the default that comes when Nginx is installed.

If anyone knows how I can solve this, please share the clues.


2024/08/11 13:57:09 [error] 565638#565638: \*59 open() "/usr/share/nginx/html/static/CACHE/css/output.9efeb5f3d52b.css" failed (2: No such file or directory), client: 162.158.154.134, server: mm3-lists.kictanet.or.ke, request: "GET /static/CACHE/css/output.9efeb5f3d52b.css HTTP/2.0", host: "mm3-lists.kictanet.or.ke", referrer: "<https://mm3-lists.kictanet.or.ke/accounts/logout/?next=/archives/>"

2024/08/11 13:57:09 [error] 565638#565638: \*60 open() "/usr/share/nginx/html/static/CACHE/css/output.e68c4908b3de.css" failed (2: No such file or directory), client: 162.158.154.47, server: mm3-lists.kictanet.or.ke, request: "GET /static/CACHE/css/output.e68c4908b3de.css HTTP/2.0", host: "mm3-lists.kictanet.or.ke", referrer: "<https://mm3-lists.kictanet.or.ke/accounts/logout/?next=/archives/>"

2024/08/11 13:57:09 [error] 565636#565636: \*63 open() "/usr/share/nginx/html/static/hyperkitty/libs/jquery/jquery-ui-1.13.1.min.js" failed (2: No such file or directory), client: 162.158.155.3, server: mm3-lists.kictanet.or.ke, request: "GET /static/hyperkitty/libs/jquery/jquery-ui-1.13.1.min.js HTTP/2.0", host: "mm3-lists.kictanet.or.ke", referrer: "<https://mm3-lists.kictanet.or.ke/accounts/logout/?next=/archives/>"

2024/08/11 13:57:09 [error] 565638#565638: \*65 open() "/usr/share/nginx/html/static/CACHE/js/output.3aaa7705d68a.js" failed (2: No such file or directory), client: 162.158.63.165, server: mm3-lists.kictanet.or.ke, request: "GET /static/CACHE/js/output.3aaa7705d68a.js HTTP/2.0", host: "mm3-lists.kictanet.or.ke", referrer: "<https://mm3-lists.kictanet.or.ke/accounts/logout/?next=/archives/>"

2024/08/11 13:57:09 [error] 565636#565636: \*64 open() "/usr/share/nginx/html/static/hyperkitty/libs/jquery/jquery-3.6.0.min.js" failed (2: No such file or directory), client: 162.158.158.167, server: mm3-lists.kictanet.or.ke, request: "GET /static/hyperkitty/libs/jquery/jquery-3.6.0.min.js HTTP/2.0", host: "mm3-lists.kictanet.or.ke", referrer: "<https://mm3-lists.kictanet.or.ke/accounts/logout/?next=/archives/>"

2024/08/11 14:01:01 [error] 565634#565634: \*1375 open() "/usr/share/nginx/html/static/hyperkitty/libs/jquery/smoothness/jquery-ui-1.13.1.min.css" failed (2: No such file or directory), client: 172.71.114.74, server: mm3-lists.kictanet.or.ke, request: "GET /static/hyperkitty/libs/jquery/smoothness/jquery-ui-1.13.1.min.css HTTP/2.0", host: "mm3-lists.kictanet.or.ke", referrer: "<https://mm3-lists.kictanet.or.ke/archives/list/[email protected]/thread/Y7JRQWUD2OSJMASP2K6X6TZ5KBPBKVDD/>"

2024/08/11 14:01:01 [error] 565634#565634: \*1374 open() "/usr/share/nginx/html/static/hyperkitty/libs/fonts/font-awesome/css/font-awesome.min.css" failed (2: No such file or directory), client: 188.114.102.175, server: mm3-lists.kictanet.or.ke, request: "GET /static/hyperkitty/libs/fonts/font-awesome/css/font-awesome.min.css HTTP/2.0", host: "mm3-lists.kictanet.or.ke", referrer: "<https://mm3-lists.kictanet.or.ke/archives/list/[email protected]/thread/Y7JRQWUD2OSJMASP2K6X6TZ5KBPBKVDD/>"

2024/08/11 14:01:01 [error] 565634#565634: \*1376 open() "/usr/share/nginx/html/static/CACHE/css/output.44ea6c55e917.css" failed (2: No such file or directory), client: 162.158.129.221, server: mm3-lists.kictanet.or.ke, request: "GET /static/CACHE/css/output.44ea6c55e917.css HTTP/2.0", host: "mm3-lists.kictanet.or.ke", referrer: "<https://mm3-lists.kictanet.or.ke/archives/list/[email protected]/thread/Y7JRQWUD2OSJMASP2K6X6TZ5KBPBKVDD/>"

2024/08/11 14:01:01 [error] 565637#565637: \*1378 open() "/usr/share/nginx/html/static/CACHE/css/output.e68c4908b3de.css" failed (2: No such file or directory), client: 162.158.129.235, server: mm3-lists.kictanet.or.ke, request: "GET /static/CACHE/css/output.e68c4908b3de.css HTTP/2.0", host: "mm3-lists.kictanet.or.ke", referrer: "<https://mm3-lists.kictanet.or.ke/archives/list/[email protected]/thread/Y7JRQWUD2OSJMASP2K6X6TZ5KBPBKVDD/>"

2024/08/11 14:01:01 [error] 565634#565634: \*1377 open() "/usr/share/nginx/html/static/CACHE/css/output.9efeb5f3d52b.css" failed (2: No such file or directory), client: 162.158.130.75, server: mm3-lists.kictanet.or.ke, request: "GET /static/CACHE/css/output.9efeb5f3d52b.css HTTP/2.0", host: "mm3-lists.kictanet.or.ke", referrer: "<https://mm3-lists.kictanet.or.ke/archives/list/[email protected]/thread/Y7JRQWUD2OSJMASP2K6X6TZ5KBPBKVDD/>"

2024/08/11 14:01:01 [error] 565634#565634: \*1381 open() "/usr/share/nginx/html/static/hyperkitty/libs/jquery/jquery-3.6.0.min.js" failed (2: No such file or directory), client: 172.71.114.124, server: mm3-lists.kictanet.or.ke, request: "GET /static/hyperkitty/libs/jquery/jquery-3.6.0.min.js HTTP/2.0", host: "mm3-lists.kictanet.or.ke", referrer: "<https://mm3-lists.kictanet.or.ke/archives/list/[email protected]/thread/Y7JRQWUD2OSJMASP2K6X6TZ5KBPBKVDD/>"

2024/08/11 14:01:02 [error] 565634#565634: \*1382 open() "/usr/share/nginx/html/static/hyperkitty/libs/jquery/jquery-ui-1.13.1.min.js" failed (2: No such file or directory), client: 162.158.129.208, server: mm3-lists.kictanet.or.ke, request: "GET /static/hyperkitty/libs/jquery/jquery-ui-1.13.1.min.js HTTP/2.0", host: "mm3-lists.kictanet.or.ke", referrer: "<https://mm3-lists.kictanet.or.ke/archives/list/[email protected]/thread/Y7JRQWUD2OSJMASP2K6X6TZ5KBPBKVDD/>"

2024/08/11 14:01:02 [error] 565634#565634: \*1383 open() "/usr/share/nginx/html/static/CACHE/js/output.3aaa7705d68a.js" failed (2: No such file or directory), client: 172.71.114.221, server: mm3-lists.kictanet.or.ke, request: "GET /static/CACHE/js/output.3aaa7705d68a.js HTTP/2.0", host: "mm3-lists.kictanet.or.ke", referrer: "<https://mm3-lists.kictanet.or.ke/archives/list/[email protected]/thread/Y7JRQWUD2OSJMASP2K6X6TZ5KBPBKVDD/>"  

Below is my site config:


server {  

if ($host = [mm3-lists.kictanet.or.ke](http://mm3-lists.kictanet.or.ke/)) {  

return 301 https://$host$request\_uri;  

listen 80;  

server\_name [mm3-lists.kictanet.or.ke](http://mm3-lists.kictanet.or.ke/);  

return 301 [https://mm3-lists.kictanet.or.ke](https://mm3-lists.kictanet.or.ke/)$request\_uri;  

include snippets/letsencrypt.conf; 

}  

server {  

listen 443 ssl http2;  

listen [::]:443 ssl http2;  

server\_name [mm3-lists.kictanet.or.ke](http://mm3-lists.kictanet.or.ke/);  

ssl\_certificate /etc/letsencrypt/live/[mm3-lists.kictanet.or.ke/fullchain.pem](http://mm3-lists.kictanet.or.ke/fullchain.pem);  

ssl\_certificate\_key /etc/letsencrypt/live/[mm3-lists.kictanet.or.ke/privkey.pem](http://mm3-lists.kictanet.or.ke/privkey.pem);  

ssl\_trusted\_certificate /etc/letsencrypt/live/[mm3-lists.kictanet.or.ke/chain.pem](http://mm3-lists.kictanet.or.ke/chain.pem);  

include snippets/ssl.conf;  

include snippets/letsencrypt.conf;  

access\_log /var/log/nginx/mm3-lists\_access.log;  

error\_log /var/log/nginx/mm3-lists\_error.log;  

location = /favicon.ico {  

log\_not\_found off;  

access\_log off;  

}  

location = /robots.txt {  

allow all;  

log\_not\_found off;  

access\_log off;  

}  

location /static/ {  

alias /opt/mailman/mm/static/;  

}  

location / {  

proxy\_pass [http://127.0.0.1:8010](http://127.0.0.1:8010/);  

proxy\_set\_header Host $host;  

proxy\_set\_header X-Forwarded-For   $remote\_addr;  

}  

}  

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here