本来网站一直正常的,刚才上服务器,wget下载了discuz的程序,是zip打包的,所以用yum install unzip安装了 unzip用来解压程序包。
然后没事做,访问网站玩玩,发现伪静态不起作用了,再然后,做了很多尝试修复之类的,都不起作用,太神奇了,难道安装unzip会对nginx有影响?有熟悉nginx的朋友能帮忙看看怎么回事吗?急呀,我网站没伪静态根本就是一死站,连接全打不开,因为连接全写成伪静态的连接的。
以下是nginx.conf配置:
user  www www;
worker_processes  1;
#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;
pid        logs/nginx.pid;
events {
    use epoll;
    worker_connections  10240;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';
    #access_log  logs/access.log  main;
    server_names_hash_bucket_size 128;
    client_header_buffer_size 32k;
    large_client_header_buffers 4 32k;
    client_max_body_size 8m;
    sendfile        on;
    tcp_nopush     on;
    #keepalive_timeout  0;
    keepalive_timeout  65;
    gzip  on;
    server {
        listen       80;
        server_name  
www.woosoo.com;
        #charset koi8-r;
        #access_log  logs/host.access.log  main;
        location / {
     root   /mnt/wwwroot/dianying;
     index index.php index.html index.htm;
            rewrite ^(.*)movie(.*)\.html$ $1movie.php?id=$2 last;
     rewrite ^(.*)index(.*)\.html$ $1index.php?p=$2 last;
     rewrite ^(.*)list-([0-9]*)-([0-9]*)-([0-9]*)-([0-9]*)-(.*)\.html$ $1list.php?p=$2&a=$3&b=$4&c=$5&d=$6 last;
     rewrite ^(.*)s(.*)-([0-9]*)-kw(.*)\.html$ $1s.php?id=$2&p=$3&s=$4 last;
     rewrite ^(.*)m([0-9]*)--(.*)\.html$ $1baidu.php?id=$2&bdhd=$3 last;
        }
 location ~ .*\.(gif|jpg|jpeg|png|ico|swf|js|css)?$ {
     root   /mnt/wwwroot/dianying;
     access_log off; 
     expires 30d;
 }
 location ~ .*\.(html|htm)?$ {
     root   /mnt/wwwroot/dianying;
     access_log off;
     expires 300;
 }
        #error_page  404              404.html;
        # redirect server error pages to the static page /50x.html
        #
        #error_page   500 502 503 504  50x.html;
        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   
http://127.0.0.1;
        #}
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /mnt/wwwroot/dianying$fastcgi_script_name;
            include        fastcgi_params;
        }
        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
    }
    server {
        server_name 
woosoo.com;
 rewrite ^(.*) 
http://www.woosoo.com$1 permanent;
    }
}
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
-------------------------
-------------------------
-------------------------
-------------------------
-------------------------