-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmessage_board
82 lines (69 loc) · 2.39 KB
/
message_board
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
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##
# Default server configuration
#
server {
listen 8060 default_server;
listen [::]:8060 default_server;
root /;
server_name _;
location / {
autoindex off;
try_files /srv/mb/message_board_name$uri /usr/local/share/mb$uri =404;
}
location ~* ^.+.(js|css|png|jpg|jpeg|gif|ico)$ {
try_files /srv/mb/message_board_name$uri /usr/local/share/mb$uri =404;
access_log off;
expires max;
}
location = /favicon.ico {
try_files /srv/mb/message_board_name$uri /usr/local/share/mb$uri =404;
log_not_found off;
access_log off;
expires max;
}
location = /robots.txt {
try_files /srv/mb/message_board_name$uri =404;
allow all;
log_not_found off;
access_log off;
}
location ~ /\.ht {
log_not_found off;
deny all;
}
rewrite ^(/media/.*)$ $1 last;
rewrite ^(/favicon.ico)$ $1 last;
rewrite ^/(.*)$ /mb/$1 ;
location /mb {
fastcgi_pass unix:/tmp/mb-fcgi.sock;
fastcgi_split_path_info ^(/mb)(.*)?$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_NAME /var/www/forum/mb;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
}
}