aboutsummaryrefslogtreecommitdiff
path: root/overleaf-mods/overleaf-ldap-oauth2/ldap-overleaf-sl/nginx/sharelatex.conf
blob: 663a0ecb28c1a8205e6b43132c010dfa2e8f5ce0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
server {
	listen         80;
	server_name    _; # Catch all, see http://nginx.org/en/docs/http/server_names.html
#        location / {
#          return 301 https://$host$request_uri;
#        }    
#}
#
#
#server {
#        
#	listen 443 ssl default_server;
#        listen [::]:443 ssl default_server;
#        server_name    _; # Catch all

        add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
        server_tokens off;
        add_header X-Frame-Options SAMEORIGIN;
        add_header X-Content-Type-Options nosniff;

	set $static_path /var/www/sharelatex/web/public;
#        ssl_certificate /etc/certificate.crt;
#        ssl_certificate_key /etc/key.crt;
#        ssl_certificate /etc/letsencrypt/certs/domain/fullchain.pem;
#        ssl_certificate_key /etc/letsencrypt/certs/domain/privkey.pem;
# 	include /etc/nginx/options-ssl-nginx.conf;
#        ssl_dhparam /etc/nginx/ssl-dhparams.pem;
#
	location / {
		proxy_pass http://127.0.0.1:3000;
		proxy_http_version 1.1;
		proxy_set_header Upgrade $http_upgrade;
		proxy_set_header Connection "upgrade";
		proxy_set_header X-Forwarded-Host $host;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_read_timeout 3m;
		proxy_send_timeout 3m;
	}
	
	location /socket.io {
		proxy_pass http://127.0.0.1:3026;
		proxy_http_version 1.1;
		proxy_set_header Upgrade $http_upgrade;
		proxy_set_header Connection "upgrade";
		proxy_set_header X-Forwarded-Host $host;
		proxy_set_header X-Forwarded-Proto $scheme;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_read_timeout 3m;
		proxy_send_timeout 3m;
	}

	location /stylesheets {
		expires 1y;
		root $static_path/;
	}

	location /minjs {
		expires 1y;
		root $static_path/;
	}

	location /img {
		expires 1y;
		root $static_path/;
	}
}