File tree Expand file tree Collapse file tree 1 file changed +12
-30
lines changed
Expand file tree Collapse file tree 1 file changed +12
-30
lines changed Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments