Skip to content

Commit 5e7096e

Browse files
committed
Add nginx config for convert2doc.com with proxy settings and timeouts
1 parent db1936b commit 5e7096e

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

etc/convert2doc.com.conf

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
####################################################
2+
# convert2doc.com #
3+
####################################################
4+
5+
server {
6+
listen [::]:80;
7+
listen 80;
8+
server_name convert2doc.com;
9+
return 301 https://convert2doc.com$request_uri;
10+
}
11+
12+
server {
13+
server_name convert2doc.com;
14+
#index index.html;
15+
#root /home/ubuntu/www/chat.profullstack.com/chat.profullstack-ui/build;
16+
17+
add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
18+
add_header 'Last-Modified' '';
19+
if_modified_since off;
20+
expires -1;
21+
etag off;
22+
23+
# listen [::]:443 ssl http2; #managed by Certbot
24+
# listen 443 ssl http2; #managed by Certbot
25+
# ssl_certificate /etc/letsencrypt/live/convert2doc.com/fullchain.pem; #managed by Certbot
26+
# ssl_certificate_key /etc/letsencrypt/live/convert2doc.com/privkey.pem; # managed by Certbot
27+
# include /etc/letsencrypt/options-ssl-nginx.conf; #managed by Certbot
28+
# ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; #managed by Certbot
29+
# ssl_protocols TLSv1.2;
30+
31+
32+
#try_files $uri $uri/ /index.html;
33+
client_max_body_size 1000M;
34+
#rewrite ^(/.*)\.html(\?.*)?$ $1$2 permanent;
35+
#rewrite ^/(.*)/$ /$1 permanent;
36+
# try_files $uri/index.html $uri.html $uri/ $uri =404;
37+
38+
client_body_timeout 600s;
39+
client_header_timeout 600s;
40+
keepalive_timeout 600s;
41+
send_timeout 600s;
42+
43+
location / {
44+
proxy_pass http://localhost:8099;
45+
proxy_http_version 1.1;
46+
proxy_set_header Upgrade $http_upgrade;
47+
proxy_set_header Connection 'upgrade';
48+
proxy_cache_bypass $http_upgrade;
49+
proxy_set_header Host $host;
50+
proxy_set_header X-Real-IP $remote_addr;
51+
proxy_set_header X-Forwarded-Proto https;
52+
proxy_set_header X-Forwarded-For $remote_addr;
53+
54+
# Increase proxy timeouts
55+
proxy_connect_timeout 600s;
56+
proxy_send_timeout 600s;
57+
proxy_read_timeout 600s;
58+
send_timeout 600s;
59+
60+
# Optional: Increase buffer sizes
61+
proxy_buffer_size 128k;
62+
proxy_buffers 4 256k;
63+
proxy_busy_buffers_size 256k;
64+
65+
# Optional: Disable buffering
66+
proxy_buffering off;
67+
}
68+
}

0 commit comments

Comments
 (0)