新手配置zencart伪静态出问题,请求解决
发表于 : 2012-03-18 11:42
我修改了 /etc/nginx/nginx.conf
在后面添加了server模块
server
{
listen 80;
server_name http://www.hebaodans.com;
index index.html index.htm index.php;
root /wwwroot/www.hebaodans.com;
location ~ .*\.(php|php5)?$
{
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
#include rewite rule file or you can directly write here
include rewrite.conf;
log_format hebaodanscom ‘$remote_addr – $remote_user [$time_local] “$request” ‘
‘$status $body_bytes_sent “$http_referer” ‘
‘”$http_user_agent” $http_x_forwarded_for’;
access_log /logs/hebaodanscom.log hebaodanscom;
}
保存 同时新建了一个文件rewrite.conf放在/etc/nginx/目录下面,结果/etc/init.d/nginx restart
的时候就提示错误Restarting nginx: [emerg]: unknown directive "server" in /etc/nginx/nginx.conf:33
是什么原因呢 ?我查了很多资料都没有关于这个解决办法了
在后面添加了server模块
server
{
listen 80;
server_name http://www.hebaodans.com;
index index.html index.htm index.php;
root /wwwroot/www.hebaodans.com;
location ~ .*\.(php|php5)?$
{
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
#include rewite rule file or you can directly write here
include rewrite.conf;
log_format hebaodanscom ‘$remote_addr – $remote_user [$time_local] “$request” ‘
‘$status $body_bytes_sent “$http_referer” ‘
‘”$http_user_agent” $http_x_forwarded_for’;
access_log /logs/hebaodanscom.log hebaodanscom;
}
保存 同时新建了一个文件rewrite.conf放在/etc/nginx/目录下面,结果/etc/init.d/nginx restart
的时候就提示错误Restarting nginx: [emerg]: unknown directive "server" in /etc/nginx/nginx.conf:33
是什么原因呢 ?我查了很多资料都没有关于这个解决办法了