20,359
社区成员
发帖
与我相关
我的任务
分享
set bat=%~f0
set batDir=%~dp0
CD "%batDir%"
set log=%batDir%log\
::启动nginx服务
:callLabel8
set called=1
start "fcgi服务" /MIN /D "%batDir%php" php-cgi.exe -b 127.0.0.1:9000 -c "%batDir%php/php.ini"
start "nginx服务" /MIN /D "%batDir%nginx" nginx.exe
:eof_callLabel8
goto :EOF
::eof_启动nginx服务
::停止nginx服务
:callLabel9
set called=1
start "停止php-cgi服务" /MIN /D "%batDir%php" taskkill /F /IM php-cgi.exe > nul
start "nginx服务" /MIN /D "%batDir%nginx" nginx.exe -s stop
:eof_callLabel9
goto :EOF
::eof_停止nginx服务
server {
listen 80;
server_name www.cnntaa.com
cnntaa.com;
access_log ./../log/cnntaa.com.access.txt;
#charset koi8-r;
location / {
index index.html index.php;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
root ../www/ntaa/phpcms/www;
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
include fastcgi.conf;
fastcgi_intercept_errors on;
#这里只能使用绝对路径
root d:/web/www/ntaa/phpcms/www;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
<!DOCTYPE html>
<html>
<head>
<!--#include virtual="/fragment/header.htm"-->
<!--#include virtual="/fragment/seajs.htm"-->
</head>
<body>
<!--#include virtual="/fragment/nav.htm"-->
fffdddd
<!--#include virtual="/fragment/footer.htm"-->
</body>
</html>