Edit nginx for hosting
This commit is contained in:
@@ -1,39 +1,39 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
|
||||
location /api/v1/graphql {
|
||||
proxy_pass http://backend:8080/api/v1/graphql;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
}
|
||||
|
||||
location /api/v1/upload {
|
||||
proxy_pass http://backend:8080/upload;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
}
|
||||
|
||||
location /api/v1/datacenter {
|
||||
proxy_pass http://backend:8080/api/v1/datacenter;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
}
|
||||
|
||||
# Hata durumlarında da index.html'i sun
|
||||
error_page 404 /index.html;
|
||||
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_min_length 10240;
|
||||
gzip_proxied any;
|
||||
gzip_types text/plain text/css text/xml text/javascript application/javascript application/json application/xml application/rss+xml application/atom+xml image/svg+xml;
|
||||
gzip_comp_level 5;
|
||||
}
|
||||
server {
|
||||
listen 80;
|
||||
server_name bgreen.blc-css.com;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
|
||||
location /api/v1/graphql {
|
||||
proxy_pass http://bgreen-backend:8080/api/v1/graphql;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
}
|
||||
|
||||
location /api/v1/upload {
|
||||
proxy_pass http://bgreen-backend:8080/upload;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
}
|
||||
|
||||
# location /api/v1/datacenter {
|
||||
# proxy_pass http://backend:8080/api/v1/datacenter;
|
||||
# proxy_set_header Host $host;
|
||||
# proxy_set_header X-Real-IP $remote_addr;
|
||||
# }
|
||||
|
||||
# Hata durumlarında da index.html'i sun
|
||||
error_page 404 /index.html;
|
||||
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_min_length 10240;
|
||||
gzip_proxied any;
|
||||
gzip_types text/plain text/css text/xml text/javascript application/javascript application/json application/xml application/rss+xml application/atom+xml image/svg+xml;
|
||||
gzip_comp_level 5;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user