Skip to content

Commit d6ffb0d

Browse files
committed
feat(Nginx): Remove proxy pass
1 parent 07b41b3 commit d6ffb0d

File tree

1 file changed

+12
-30
lines changed

1 file changed

+12
-30
lines changed

nginx-custom.conf

Lines changed: 12 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,15 @@
1-
upstream backend {
2-
server backend:7777;
3-
}
4-
5-
server {
6-
listen 80;
7-
charset utf-8;
8-
server_name localhost;
9-
10-
root /usr/share/nginx/html;
11-
index index.html index.htm;
12-
include /etc/nginx/mime.types;
1+
server {
2+
listen 80;
3+
charset utf-8;
134

14-
gzip on;
15-
gzip_types text/css text/javascript application/x-javascript application/json;
5+
root /usr/share/nginx/html;
6+
index index.html index.htm;
7+
include /etc/nginx/mime.types;
168

17-
# backend urls
18-
location ~ ^/(admin|api|media) {
19-
proxy_redirect off;
20-
proxy_pass http://backend;
21-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
22-
proxy_set_header Host $http_host;
23-
}
9+
gzip on;
10+
gzip_types text/css text/javascript application/x-javascript application/json;
2411

25-
location /api {
26-
proxy_pass http://backend;
27-
}
28-
29-
# frontend
30-
location / {
31-
try_files $uri $uri/ /index.html;
32-
}
33-
}
12+
location / {
13+
try_files $uri $uri/ /index.html;
14+
}
15+
}

0 commit comments

Comments
 (0)