lnmp0.8升级nginx1.1.11后 启动的时候一个小问题 请教军哥
https://bbs.vpser.net/thread-6274-1-1.html 这个问题 我重装了一遍 解决了然后我升级了 nginx 1.1.11 php5.3.8 都成功了 但是重启的时候
Restarting LNMP...
Starting Nginx...
Test Nginx configure...
Nginx program is reloding!
nginx: the "log_format" directive may be used only on "http" level in /usr/local/nginx/conf/nginx.conf:85
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
nginx: the "log_format" directive may be used only on "http" level in /usr/local/nginx/conf/nginx.conf:85
Shutting down MySQL. SUCCESS!
Starting MySQL. SUCCESS!
Gracefully shutting down php-fpm . done
Starting php-fpmdone
这么一段话
nginx nginx: the "log_format" directive may be used only on "http" level in /usr/local/nginx/conf/nginx.conf:85
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
nginx: the "log_format" directive may be used only on "http" level in /usr/local/nginx/conf/nginx.conf:85
不知道是不是哪里出错了 ?不过网站可以正常访问 85行 在 nginx.conf 是这么一段话
"$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
请问军哥这是问题么? 肯定自己修改配置文件,日志信息已经说了 log_format 只能放在http里
贴配置文件吧
回复 2# 的帖子
我装完直接就升级 1.1.11了 什么也没动,配置文件是指哪个? 我也遇到一样的问题,但是系统已经重装了,也没升级到那个版本。 应该是你修改过配置文件要不你自己贴配置文件
回复 5# 的帖子
userwww www;worker_processes 1;
error_logoff;
pid /usr/local/nginx/logs/nginx.pid;
#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 51200;
events
{
use epoll;
worker_connections 51200;
}
http
{
fastcgi_intercept_errors on;
include mime.types;
default_typeapplication/octet-stream;
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 50m;
sendfile on;
tcp_nopush on;
keepalive_timeout 60;
tcp_nodelay on;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 256k;
gzip on;
gzip_min_length1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;
#limit_zonecrawler$binary_remote_addr10m;
server
{
listen 80;
server_name www.lnmp.org;
index index.html index.htm index.php;
root/home/wwwroot;
location ~ .*\.(php|php5)?$
{
fastcgi_passunix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fcgi.conf;
}
location /status {
stub_status on;
access_log off;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
log_formataccess'$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
access_logoff;
}
include vhost/*.conf;
}
这是配置 请看下
回复 6# 的帖子
测试了一下没报错 原帖由 licess 于 2011-12-27 09:41 发表 https://bbs.vpser.net/images/common/back.gif测试了一下没报错 可是我的确实出现了。。
回复 8# 的帖子
nginx 1.1.11 和1.0.10 都测试过了没问题回复 9# 的帖子
唉 不纠结了 反正不影响使用 原帖由 licess 于 2011-12-27 09:41 发表 https://bbs.vpser.net/images/common/back.gif测试了一下没报错
我的是在升级1.1.12的之后出现的。 原帖由 licess 于 2011-12-27 11:35 发表 https://bbs.vpser.net/images/common/back.gif
nginx 1.1.11 和1.0.10 都测试过了没问题
我是在升级成1.1.12的时候出现的
原帖由 licess 于 2011-12-27 09:41 发表 https://bbs.vpser.net/images/common/back.gif
测试了一下没报错
这个问题我是出现在升级1.1.12的过程中配置一样是没修改过的
userwww www;
worker_processes 1;
error_log/home/wwwlogs/nginx_error.logcrit;
pid /usr/local/nginx/logs/nginx.pid;
#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 51200;
events
{
use epoll;
worker_connections 51200;
}
http
{
include mime.types;
default_typeapplication/octet-stream;
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 50m;
sendfile on;
tcp_nopush on;
keepalive_timeout 60;
tcp_nodelay on;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 256k;
gzip on;
gzip_min_length1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;
#limit_zonecrawler$binary_remote_addr10m;
server
{
listen 80;
server_name cms.taidongyuan.cn;
index index.html index.htm index.php;
root/home/wwwroot;
location ~ .*\.(php|php5)?$
{
fastcgi_passunix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fcgi.conf;
}
location /status {
stub_status on;
access_log off;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
log_formataccess'$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
access_log/home/wwwlogs/access.logaccess;
}
include vhost/*.conf;
} 我的也出现这个错误了。 找到解决办法啦,将log那几行挪出server外就没事了:
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
}
log_formatphpfly.net'$remote_addr - $remote_user [$time_loca
$request '
'$status $body_bytes_sent $http_referer '
'$http_user_agent $http_x_forwarded_for';
'$http_user_agent $http_x_forwarded_for';
access_log/home/wwwlogs/phpfly.net.logphpfly.net; log_formatphpfly.net'$remote_addr - $remote_user [$time_loca
$request '
'$status $body_bytes_sent $http_referer '
'$http_user_agent $http_x_forwarded_for';
'$http_user_agent $http_x_forwarded_for';
access_log/home/wwwlogs/phpfly.net.logphpfly.net; 把这些都删掉吗,这样acces_log还会有效吗?
页:
[1]
2