存档

文章标签 ‘nginx’

Nginx默认是不允许列出整个目录的。如需此功能,
打开nginx.conf文件,在location server 或 http段中加入
autoindex on;
另外两个参数最好也加上去:

autoindex_exact_size off;
默认为on,显示出文件的确切大小,单位是bytes。
[......]

继续阅读

Oct 8th, 2009 | Filed under 网络技术
标签: ,

之前安装typecho和magike时,出现跳转异常,最后发现nginx没有配置path_info,现在把方法保存下来。

修改:

location ~ .*\.(php|php5)? $
{
fastcgi_pass unix:/tmp/php-cgi.sock;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;[......]

Jul 8th, 2009 | Filed under Linux

环境:CentOS5.3+Nginx 0.7,启用伪静态:

编辑/usr/local/nginx/conf/nginx.conf,在server段添加
server
{
listen 80;
server_name xxx.phoebus.cn;
index index.html index.htm index.php;[......]

Jul 6th, 2009 | Filed under Linux