以下內容属于 ‘nginx’ 便签:

nginx: [warn] conflicting server name “localhost” on 0.0.0.0:80, ignored

修改nginx配置参数后,使用nginx -t检查配置. 1nginx: [warn] conflicting server name "localhost" on 0.0.0.0:80, ignored 提示successfull后就可以使用 nginx -s reload来重新加载配置 我配置的过程中遇到这样的问题,就是绑定了主机名后,重新加载配置时会出现警告 1nginx: [warn] conflicting server name "localhost" on 0.0.0.0:80, ignored 意思是重复绑定了server name,但这个警告不会影响到服务器运行。而且,这个重复绑定的意思是现在运行的nginx服务和将要加载的新配置中的重复,所以,这个警告其实是不必的。 (more...)

LNMP提示Nginx PHP “No input file specified”错误因配置文件有改变

lnmp1.0升级到1.4新版本 ,出现“No input file specified”错误提示,尝试添加新的虚拟主机,比较后发现nginx conf配置文件php部分有改变,需要注意。 旧版的: 1234567location ~ .*\.(php|php5)?$         {             try_files $uri =404;             fastcgi_pass  unix:/tmp/php-cgi.sock;             fastcgi_index index.php;             include fcgi.conf;         } 新版的: 1include […] (more...)

linux操作系统重启后 解决nginx的pid消失问题

重启了linux服务器之后,进程性的 nginx -s stop后再次启动nginx -s reload ,总是会报错误nginx: [error] open() "/alidata/server/nginx/logs/nginx.pid" failed (2: No such file or directory),这应该是因为把nginx进程杀死后pid丢失了,下一次再开启nginx -s reload时无法启动,重装可以解决这个问题,但是太麻烦了。 issued a nginx -s stop and after that I got this error when trying to reload it. [error]: invalid PID number "" in "/var/run/nginx.pid" That /var/run/nginx/pid file is empty atm. What do I need to do […] (more...)

Nginx下Xenforo伪静态代码 去掉index.php

折腾了下xenforo,nginx下,涉及到伪静态,需要去掉“index.php?”,由于xenforo在国内这方面的知识并不多,去官方看了下friendurl,使用里面的代码有点小错误提示502错误。 官方的代码 123456789101112131415161718location /xf/ {     try_files $uri $uri/ /xf/index.php?$uri&$args;     index index.php index.html; } location /xf/internal_data/ {     internal; } location /xf/library/ {        internal; } location ~ \.php$ {     try_files $uri =404;     fastcgi_pass    127.0.0.1:9000;     fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;     include […] (more...)

重启nginx之后丢失pid问题解决办法

用了LNMP一件安装包,装在了Linode上,由于nginx和apache不一样,所以之前的站搬过来会遇到伪静态问题,试着修改了伪静态,后来重启的时候: (more...)