您的位置:首页 > 运维架构 > Nginx

nginx配置域名

2016-09-02 10:54 316 查看
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;

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  nginx php