VPS侦探论坛

 找回密码
 注册
查看: 4574|回复: 2

安装subs_filter之后无法启动NGINX

[复制链接]
发表于 2016-1-12 20:52:14 | 显示全部楼层 |阅读模式

先贴上NGINX.CONF
  1. user  www www;

  2. worker_processes auto;

  3. error_log  /home/wwwlogs/nginx_error.log  crit;

  4. pid        /usr/local/nginx/logs/nginx.pid;

  5. #Specifies the value for maximum file descriptors that can be opened by this process.
  6. worker_rlimit_nofile 51200;

  7. events
  8.     {
  9.         use epoll;
  10.         worker_connections 51200;
  11.         multi_accept on;
  12.     }

  13. http
  14.     {
  15.         include       mime.types;
  16.         default_type  application/octet-stream;

  17.         server_names_hash_bucket_size 128;
  18.         client_header_buffer_size 32k;
  19.         large_client_header_buffers 4 32k;
  20.         client_max_body_size 50m;

  21.         sendfile   on;
  22.         tcp_nopush on;

  23.         keepalive_timeout 60;

  24.         tcp_nodelay on;

  25.         fastcgi_connect_timeout 300;
  26.         fastcgi_send_timeout 300;
  27.         fastcgi_read_timeout 300;
  28.         fastcgi_buffer_size 64k;
  29.         fastcgi_buffers 4 64k;
  30.         fastcgi_busy_buffers_size 128k;
  31.         fastcgi_temp_file_write_size 256k;

  32.         gzip on;
  33.         gzip_min_length  1k;
  34.         gzip_buffers     4 16k;
  35.         gzip_http_version 1.1;
  36.         gzip_comp_level 2;
  37.         gzip_types     text/plain application/javascript application/x-javascript text/javascript text/css application/xml application/xml+rss;
  38.         gzip_vary on;
  39.         gzip_proxied   expired no-cache no-store private auth;
  40.         gzip_disable   "MSIE [1-6]\.";

  41.         #limit_conn_zone $binary_remote_addr zone=perip:10m;
  42.         ##If enable limit_conn_zone,add "limit_conn perip 10;" to server section.

  43.         server_tokens off;
  44.         #log format
  45.         log_format  access  '$remote_addr - $remote_user [$time_local] "$request" '
  46.              '$status $body_bytes_sent "$http_referer" '
  47.              '"$http_user_agent" $http_x_forwarded_for';
  48.                 access_log off;

  49. server
  50.     {
  51.         listen 80 default_server;
  52.         #listen [::]:80 default_server ipv6only=on;
  53.         server_name www.lnmp.org;
  54.         index index.html index.htm index.php;
  55.         root  /home/wwwroot/default;

  56.         #error_page   404   /404.html;
  57.         include enable-php.conf;

  58.         location /nginx_status
  59.         {
  60.             stub_status on;
  61.             access_log   off;
  62.         }

  63.         location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  64.         {
  65.             expires      30d;
  66.         }

  67.         location ~ .*\.(js|css)?$
  68.         {
  69.             expires      12h;
  70.         }

  71.         location ~ /\.
  72.         {
  73.             deny all;
  74.         }

  75.         access_log  /home/wwwlogs/access.log  access;
  76.     }
  77. include vhost/*.conf;
  78. }
复制代码


根据网上的教程在nginx里重新编译
  1. ./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-ipv6 --with-http_sub_module --add-module=/root/ngx_http_substitutions_filter_module-0.6.4
复制代码

然后再make && make install之后重启nginx就出现下面r提示:
  1. [root@xiaobai ~]# service nginx restart                                         Stoping nginx... nginx: [emerg] invalid variable name in /usr/local/nginx/conf/nginx.conf:99
  2. failed. Use force-quit
  3. Starting nginx... nginx (pid 1690 1689) already running.
复制代码

复制原版的过来也是同样的提示,请问该如何解决呢?
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2016-1-13 10:18:08 | 显示全部楼层

回复 1# 的帖子



首先你原来安装了,再重新编译时不能make install的如果不会可以看一下lnmp.org上的升级教程

同时已经提示了配置文件里有错误,可能是添加的虚拟主机里的配置文件
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2016-1-13 19:22:18 | 显示全部楼层

回复 2# 的帖子


虚拟文件配置之前一直用的,没有问题,我先看看怎么升级,谢谢。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-28 19:21 , Processed in 0.025691 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表