2022-09-27  2022-09-27    76 字  1 分钟
server
    {
        listen 80;
        #listen [::]:80;
        server_name example.com;
        index index.html index.htm index.php default.html default.htm default.php;
        root  /your/project/path/public;

        include rewrite/none.conf;
        #error_page   404   /404.html;

        # Deny access to PHP files in specific directory
        #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }

        include enable-php-pathinfo.conf;

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

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

        location ~ /.well-known {
            allow all;
        }

        location ~ /\.
        {
            deny all;
        }
try_files $uri $uri/ /index.php?$query_string;
        access_log  /home/wwwlogs/example.com.log;
    }

2cf92c96-1b70-8a90-e863-4c31b4c29ef6