linux nginx虛擬主機配置文件內容

#
# The default server
#
server {
        listen   80;

        server_name  192.168.176.128;

        root   /html;

        index  index.html index.htm index.php;

        location ~ .*\.(php|php5)?$ {
                root   html;
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME  /html$fastcgi_script_name;
                include fastcgi_params;
        }
                location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
                {expires  30d;}
                location ~ .*\.(js|css)?$
                {expires  1h;}
                log_format  access  '$remote_addr - $remote_user [$time_local] "$request" '
                                '$status $body_bytes_sent "$http_referer" '
                                '"$http_user_agent" $http_x_forwarded_for';
                access_log  /var/log/access.log  access;
}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章