-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwordpress.conf
More file actions
27 lines (25 loc) · 902 Bytes
/
wordpress.conf
File metadata and controls
27 lines (25 loc) · 902 Bytes
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
server {
set $htdocs /Users/epailive/web/wordpress;
listen 80;
server_name www.s1s2w.com;
error_log /var/log/test.log;
location / {
root $htdocs;
autoindex on;
index index.php index.html;
if (!-e $request_filename) {
rewrite (.*) /index.php?r=$1;
}
}
location ~ \.php$ {
root $htdocs;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
#设置PATH_INFO,注意fastcgi_split_path_info已经自动改写了fastcgi_script_name变量,
#后面不需要再改写SCRIPT_FILENAME,SCRIPT_NAME环境变量,所以必须在加载fastcgi.conf之前设置
fastcgi_param SCRIPT_FILENAME $htdocs$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
#加载Nginx默认"服务器环境变量"配置
include fastcgi.conf;
}
}