-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf
More file actions
46 lines (39 loc) · 1.03 KB
/
nginx.conf
File metadata and controls
46 lines (39 loc) · 1.03 KB
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
39
40
41
42
43
44
45
46
events {
# 이벤트 설정
}
http {
include /etc/nginx/mime.types; # MIME 타입 설정 파일 추가
default_type application/octet-stream;
server {
listen 80;
server_name shortpingoo.shop;
location /uploads {
root /usr/share/nginx/html;
try_files $uri $uri/ =404;
# 이미지 파일 MIME 타입 설정 (PNG, JPEG)
types {
image/png png;
image/jpeg jpeg jpg;
image/gif gif;
}
}
# 기본 웹 페이지 설정
location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri/ /index.html;
}
error_page 404 /404.html;
location = /404.html {
internal;
}
location ~ /\.env {
deny all;
}
location ~ /\.(?!well-known).* {
deny all;
}
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
}
}