-
Notifications
You must be signed in to change notification settings - Fork 2
/
nginx.conf
69 lines (61 loc) · 1.31 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Пример минимальной конфигурации nginx.conf
upstream phpfcgi {
# server 127.0.0.1:9000;
# for PHP-FPM running on UNIX socket
server unix:/var/run/php-fpm.sock;
}
server {
location ~ /\. {
deny all;
}
charset utf-8;
listen 80;
server_name forum.wapinet.ru;
root /var/www/forum;
index index.php;
error_log /var/log/nginx/forum.error.log;
access_log /var/log/nginx/forum.access.log;
location ^~ /include/ {
deny all;
}
location ^~ /uploads/ {
deny all;
}
location ^~ /uploaded/ {
deny all;
}
location ^~ /plugins/ {
deny all;
}
location ^~ /lang/ {
deny all;
}
location ^~ /cache/ {
deny all;
}
location ~ \.php$ {
fastcgi_pass phpfcgi;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ^~ /style/ {
access_log off;
expires 30d;
}
location ^~ /img/ {
access_log off;
expires 30d;
}
location ^~ /js/ {
access_log off;
expires 30d;
}
location ^~ /favicon.ico {
access_log off;
expires 30d;
}
location ^~ /robots.txt {
access_log off;
expires 30d;
}
}