-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx-ssl.conf
More file actions
98 lines (74 loc) · 2.62 KB
/
nginx-ssl.conf
File metadata and controls
98 lines (74 loc) · 2.62 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
worker_processes 1;
pid /run/nginx.pid;
events {
worker_connections 1024;
use epoll;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
client_max_body_size 200M;
client_body_buffer_size 200M;
server {
listen *:80;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
root /srv/www;
index index.php;
location / {
try_files \$uri \$uri/ /static/\$uri /dynamic/\$uri /index.php?_route_=\$uri&\$args;
}
location ~ \\.(tpl|ini) {
deny all;
}
location ~* \\.(?:ico|css|js|gif|jpe?g|png)$ {
# Some basic cache-control for static files to be sent to the browser
expires max;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
location = /robots.txt { access_log off; log_not_found off; }
location = /favicon.ico { access_log off; log_not_found off; }
location ~ /\\. { access_log off; log_not_found off; deny all; }
location ~ \\.php {
include /etc/nginx/fastcgi.conf;
fastcgi_pass unix:/tmp/php-fpm.sock;
}
}
server {
listen *:443;
ssl on;
ssl_certificate /config/cert.pem;
ssl_certificate_key /config/cert.key;
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/access-ssl.log;
error_log /var/log/nginx/error-ssl.log;
root /srv/www;
index index.php;
location / {
try_files \$uri \$uri/ /static/\$uri /dynamic/\$uri /index.php?_route_=\$uri&\$args;
}
location ~ \\.(tpl|ini) {
deny all;
}
location ~* \\.(?:ico|css|js|gif|jpe?g|png)$ {
# Some basic cache-control for static files to be sent to the browser
expires max;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
location = /robots.txt { access_log off; log_not_found off; }
location = /favicon.ico { access_log off; log_not_found off; }
location ~ /\\. { access_log off; log_not_found off; deny all; }
location ~ \\.php {
include /etc/nginx/fastcgi.conf;
fastcgi_pass unix:/tmp/php-fpm.sock;
}
}
}