nginx配置域名

server {
        listen 90;
        server_name weishenghuo.com;
        index index.html index.htm index.php;
        root /xmisp/www/weishenghuo/public;
        if (!-f $request_filename) {
                rewrite ^/(.+)$ /index.php?$1& last;
        }
        location ~ .*\.(php|php5)?$ {
                #fastcgi_pass  unix:/tmp/php-cgi.sock;
                fastcgi_pass  127.0.0.1:9000;
                fastcgi_index index.php;
                include fastcgi.conf;
        }
        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
                expires 30d;
        }
        location ~ .*\.(js|css)?$ {
                expires 1h;
        }
        #access_log  /xmisp/log/nginx/access/default.log;
}

你可能感兴趣的:(杂)