首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法启动与ngx_pagespped一起安装的新的nginx二进制文件

无法启动与ngx_pagespped一起安装的新的nginx二进制文件
EN

Server Fault用户
提问于 2016-10-16 11:45:54
回答 1查看 746关注 0票数 0

我想用ngx_分页模块来设置nginx。由于我已经在我的服务器上设置了nginx,所以在使用以下命令再次编译它之前,我删除了它。

代码语言:javascript
复制
sudo apt-get remove --purge nginx
sudo apt-get autoremove
sudo apt-get autoclean

我使用给出的这里指令构建了一个新的带有分页支持的nginx二进制文件。

whereis nginx提供以下输出

代码语言:javascript
复制
nginx: /usr/sbin/nginx /etc/nginx /usr/local/sbin/nginx /usr/local/nginx /usr/share/nginx /usr/share/man/man1/nginx.1.gz

下面是nginx -V命令的输出

代码语言:javascript
复制
nginx version: nginx/1.10.1
built by gcc 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
configure arguments: --add-module=/root/ngx_pagespeed-release-1.11.33.4-beta --prefix=/usr/local/share/nginx --conf-path=/etc/nginx/nginx.conf --sbin-path=/usr/local/sbin --error-log-path=/var/log/nginx/error.log --with-ipv6

/usr/sbin/nginx -V的输出是

代码语言:javascript
复制
nginx version: nginx/1.4.6 (Ubuntu)
built by gcc 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_spdy_module --with-http_sub_module --with-http_xslt_module --with-mail --with-mail_ssl_module

我使用分页模块设置更新了我的nginx.conf文件,并尝试使用sudo service restart nginx重新启动nginx服务器,这给了我* Restarting nginx nginx [fail]

如果我使用nginx -t测试我的新的nginx设置,它会说配置很好。

代码语言:javascript
复制
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

但是我在错误日志中发现了这一点。

代码语言:javascript
复制
[emerg] 24452#0: unknown directive "pagespeed" in /etc/nginx/nginx.conf:65

我在某个地方读到运行以下命令来启动正确的nginx - sudo /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf。这给了我以下输出

代码语言:javascript
复制
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()

由于某种原因,我的旧的nginx二进制文件仍然在运行,它不会让新的二进制文件启动。如何运行新的二进制文件呢?

EN

回答 1

Server Fault用户

发布于 2016-10-16 14:06:36

然后启动本地的killall -9 nginx

票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/809340

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档