-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
executable file
·40 lines (32 loc) · 911 Bytes
/
nginx.conf
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
events{}
http {
include /etc/nginx/mime.types;
server {
listen 80;
server_name studyum.net;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name studyum.net;
root /usr/share/nginx/html;
index index.html;
ssl_certificate /srv/ssl/studyum_net.crt;
ssl_certificate_key /srv/ssl/studyum_net.key;
ssl_client_certificate /srv/ssl/cloudflare.crt;
location / {
try_files $uri $uri/ /index.html;
}
location /api {
proxy_pass https://api.studyum.net/api;
proxy_ssl_name $host;
proxy_ssl_server_name on;
}
location /storage {
proxy_pass http://likdn.co/storage;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
}