Skip to content

Commit d7c9f36

Browse files
authored
Create nginx_no_domain.conf
1 parent 221e7d9 commit d7c9f36

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

nginx_no_domain.conf

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
server {
2+
listen 80;
3+
listen [::]:80;
4+
server_name _; # Use underscore for all IP-based access or replace with actual IP address
5+
6+
# Redirect HTTP to HTTPS (optional, remove if not using HTTPS)
7+
return 301 https://$host$request_uri;
8+
}
9+
10+
server {
11+
listen 443 ssl;
12+
listen [::]:443 ssl;
13+
server_name _; # Use underscore for all IP-based access or replace with actual IP address
14+
15+
# SSL configuration (optional, if you're not using SSL with the IP, remove these lines)
16+
ssl_certificate /etc/letsencrypt/live/subdomain.domain.com/fullchain.pem;
17+
ssl_certificate_key /etc/letsencrypt/live/subdomain.domain.com/privkey.pem;
18+
19+
client_max_body_size 4G;
20+
21+
location / {
22+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
23+
proxy_set_header X-Forwarded-Proto $scheme;
24+
proxy_set_header Host $http_host;
25+
proxy_redirect off;
26+
proxy_pass http://merginmaps-web;
27+
}
28+
29+
location ~ /v1/project/download/ {
30+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
31+
proxy_set_header X-Forwarded-Proto $scheme;
32+
proxy_set_header Host $http_host;
33+
proxy_redirect off;
34+
proxy_pass http://merginmaps-server:5000;
35+
36+
client_max_body_size 0;
37+
proxy_http_version 1.1;
38+
proxy_request_buffering off;
39+
proxy_buffering off;
40+
}
41+
42+
location ~ ^/(v1/|v2/|app/|ping|config) {
43+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
44+
proxy_set_header X-Forwarded-Proto $scheme;
45+
proxy_set_header Host $http_host;
46+
proxy_pass http://merginmaps-server:5000;
47+
}
48+
49+
location /download/ {
50+
internal;
51+
alias /data;
52+
}
53+
}

0 commit comments

Comments
 (0)