nginx 405 Not Allowed

nginx 405 Not Allowed 这个错误的原因是:Apache、IIS、Nginx等绝大多数web服务器,都不允许静态文件响应POST请求,否则会返回“HTTP/1.1 405 Method not allowed”错误。

nginx编译选项

./configure –prefix=/opt/nginx \ –conf-path=/etc/nginx/nginx.conf \ –error-log-path=/var/log/nginx/error.log \ –pid-path=/var/tmp/nginx/nginx.pid \ –lock-path=/var/lock/nginx.lock \ –user=nginx \ –group=nginx \ –with-http_flv_module \ –with-http_ssl_module \ –add-module=’/opt/passenger/ext/nginx’ \ –with-http_gzip_static_module \ –http-log-path=/var/log/nginx/access.log \ –http-client-body-temp-path=/var/tmp/nginx/client/ \ –http-proxy-temp-path=/var/tmp/nginx/proxy/ \ –http-fastcgi-temp-path=/var/tmp/nginx/fastcgi/ \ –http-scgi-temp-path=/var/tmp/nginx/scgi/ \ –http-uwsgi-temp-path=/var/tmp/nginx/uwsgi/

rewrite module requires the PCRE library

在编译nginx时遇到rewrite module requires the PCRE library错误,提示需要PCRE库,解决方法: ubuntu下执行 apt-get install libpcre3-dev RHEL下执行 yum -y install pcre-devel

[emerg]: getpwnam(“nginx”) failed

在启动nginx之前还需要添加nginx用户组,否则会提示 [emerg]: getpwnam(“nginx”) failed 添加用户组 sudo adduser –system –no-create-home –disabled-password –group nginx

Powered by WordPress | Find Wireless Deals at BestInCellPhones.com. | Thanks to iCellPhoneDeals.com Free Cell Phones, Find Highest CD Rates and Incinerador De Grasa Revisión