-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf
More file actions
53 lines (41 loc) · 1.32 KB
/
nginx.conf
File metadata and controls
53 lines (41 loc) · 1.32 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
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;
}
}
}