-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
48 lines (38 loc) · 1.14 KB
/
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
41
42
43
44
45
46
47
48
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
server {
listen 80;
server_name localhost;
server_name_in_redirect off;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
root /usr/share/nginx/html;
location / {
try_files $uri /index.html;
}
location /objects {
try_files $uri =404;
}
location /upload {
client_max_body_size 512M;
fastcgi_pass sr3dv-php:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /opt/src/index.php;
fastcgi_hide_header X-Powered-By;
}
# add global x-content-type-options header
add_header X-Content-Type-Options nosniff;
# deny running scripts inside writable directory
location ~* /(objects)/.*\.(?!obj|stl)$ {
return 403;
error_page 403 /403_error.html;
}
location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ {
expires 14d;
}
}
}