#!/bin/sh
web_path=/data0/htdocs
cat gz20|cut -f1 |while read argv1
do
argv2=`echo $argv1|sed 's/[^www|^blog]\.//g'`
cat>>nginx.conf_bak.v< server {
listen 80;
server_name $argv2 $argv1 ;
index index.html index.htm index.php default.htm default.html default.php;
root $argv2 $argv1 ;
include web_rewrite.conf;
log_format $argv1 '\$remote_addr -\$remote_user [\$time_local] "\$request" '
'\$status \$body_bytes_sent "\$http_referer" '
'"\$http_user_agent" \$http_x_forwarded_for';
access_log /data1/logs/$argv1.log argv1;
}
EOF
done
#!/bin/sh
web_path=/data0/htdocs
cat 3blog2|cut -f1|while read argv1
do
argv2=`echo $argv1|sed 's/[^www|^blog]\.//g'`
cat>>nginx.conf_bak.v< server {
listen 80;
server_name $argv2 $arvg1;
root $web_path/$argv1;
index index.html index.htm index.php default.htm default.html default.php;
location / {
rewrite ^.*/files/(.*) /wp-content/blogs.php?file=\$1;
if (!-e \$request_filename) {
rewrite ^.+?(/wp-.*) \$1 last;
rewrite ^.+?(/.*\.php)$ \$1 last;
rewrite ^ /index.php last;
}
error_page 404 = /index.php?q=\$uri;
}
location ~ {
if (!-e \$request_filename) {
rewrite ^.+?/?(/wp-.*\\.php)\$ \$1 last;
}
include fastcgi_params;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $web_path/$argv1\$fastcgi_script_name;
rewrite ^/.*(/wp-.*/.*.php)$ \$1;
}
location /status {
stub_status on;
access_log off;
}
location ~ /\\.ht {
deny all;
}
}
EOF
done
阅读(1150) | 评论(0) | 转发(0) |