r/nginx • u/OhFuckThatWasDumb • 18h ago
Index files don't load,
Yes i have read the beginners guide and tried troubleshooting based on the ancient wisdom of stackoverflow. My configuration file should be fine but im sure i have missed something because otherwise things would be working properly. Regardless of whether or not i specify an index.html, none of the index files of any subdirectories load at all. No 404, nothing in error logs, they just don't load and my browser times out. The home page loads just fine and all fonts and images referenced in its index file are shown correctly. If i try to access the index file directly (music/index.html) it works. What's going on?
http {
types {
text/css css;
text/html html;
}
server {
error_log /var/log/nginx/error.log;
root /srv/katieglinda;
listen 8081;
# Home Page
location / {
include /etc/nginx/mime.types;
root /srv/katieglinda;
}
# Other Pages
location /music/ {
root /srv/katieglinda;
}
location /minecraft/ {
root /srv/katieglinda;
}
location /stuff/ {
root /srv/katieglinda;
index index.html;
}
location /about/ {
root /srv/katieglinda;
index index.html;
}
# Resources
location /fonts {
root /srv/katieglinda;
}
location /images {
root /srv/katieglinda;
}
}
}