LINUX & Web Server/Apache/Nginx & 技术 28 Aug 2008 02:19 pm

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

Trackback This Post | Subscribe to the comments through RSS Feed

Leave a Reply