-
Notifications
You must be signed in to change notification settings - Fork 7
/
nginx-apache-nocomp.conf
51 lines (34 loc) · 1.42 KB
/
nginx-apache-nocomp.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
41
42
43
44
45
46
47
48
49
50
server {
listen 192.168.0.1:80;
server_name metodlab.metodlab.ru;
return 301 https://metodlab.ru$request_uri;
}
server {
listen 192.168.0.1:443 ssl http2;
ssl_certificate /etc/ssl/certs/metodlab.metodlab.ru.rsa.pem;
ssl_certificate_key /etc/ssl/private/metodlab.metodlab.ru.rsa.key;
ssl_certificate /etc/ssl/certs/metodlab.metodlab.ru.ecdsa.pem;
ssl_certificate_key /etc/ssl/private/metodlab.metodlab.ru.ecdsa.key;
ssl_trusted_certificate /etc/ssl/certs/metodlab.metodlab.ru_chain.ecdsa.pem;
server_name metodlab.ru;
charset utf-8;
root /home/httpd/metodlab/www;
location / {
proxy_pass http://127.0.0.1:9090/;
proxy_redirect off;
proxy_read_timeout 120;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# Static files location
location ~* \.(jpg|jpeg|gif|png)$ {
add_header Vary $vary_header;
add_header Cache-Control $cache_control;
try_files $uri$webp_suffix $uri =404;
}
# Static files location
location ~* \.(ttf|eot|svg|woff|css|js|ico|zip|tgz|gz|rar|bz2|doc|docx|xlsx|pptx|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|avi|swf|flv|mp3|mp4|fla|htm|html)$ {
add_header Cache-Control "max-age=31536000, public, no-transform, immutable";
}
}