-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf
More file actions
38 lines (29 loc) · 785 Bytes
/
nginx.conf
File metadata and controls
38 lines (29 loc) · 785 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
events {
worker_connections 1024;
}
http {
server {
listen 80;
server_name localhost;
# Serve static files from /usr/share/nginx/html
root /usr/share/nginx/html;
index index.html;
autoindex on;
# Define the custom 404 page
error_page 404 /404.html;
# Location for the custom 404 page
location = /404.html {
internal; # Prevents direct access to the error page
}
include mime.types;
location ~ \.js$ {
add_header Content-Type application/javascript;
}
location ~ \.css$ {
add_header Content-Type text/css;
}
location ~ \.svg$ {
add_header Content-Type image/svg+xml;
}
}
}