分类 tools 下的文章

nginx简单配置

server
{
    listen 80;
    #listen [::]:80;
    server_name name;
    index index.html index.htm index.php default.html default.htm default.php;
    root  /var/share/nginx/html;

    include none.conf;
    #error_page   404   /404.html;
    location ~ [^/]\.php(/|$)
    {
        # comment try_files $uri =404; to enable pathinfo
        try_files $uri =404;
        fastcgi_pass  unix:/tmp/php-cgi.sock;
        fastcgi_index index.php;
        include fastcgi.conf;
        #include pathinfo.conf;
    }

    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
    {
        expires      30d;
    }

    location ~ .*\.(js|css)?$
    {
        expires      12h;
    }

    access_log  /home/wwwlogs/www.hkhd2016.com.log  access;
}