Skip to content


php 控制 nginx 使用404生成html

http://wiki.codemongers.com/NginxHttpCoreModule#error_page


error_page   404  =  /404.php;

我没仔细看,漏掉了中间的 “= ,
以为nginx 404 不能再用php 控制header。
在网上转的半天也学到一些东东

     fastcgi_hide_header X-Powered-By; # 在header里隐藏php的版本
     #fastcgi_pass_header Location;#在header里显示location
     #fastcgi_pass_header Status;
     fastcgi_pass_header Authorization;

自定义http 状态码
https://calomel.org/nginx.html

使用recursive_error_pages  on;递归404来找归档文件或使用memcache
http://marc.info/?l=nginx&m=120127277410400&w=2
http://blog.arh.cc/index.php?/archives/11-Simple-and-clean-nginx.conf.html

Posted in Nginx, 技术.

Tagged with , , .


No Responses (yet)

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.