server
{{
    {listen_ports}
    server_name {domains};
    index index.html index.htm default.htm default.html;
    root {site_path};
    #CERT-APPLY-CHECK--START
    # Configuration related to file verification for SSL certificate application - Do not delete
    include /www/server/panel/vhost/nginx/well-known/{project_name}.conf;
    #CERT-APPLY-CHECK--END

    #SSL-START SSL related configuration, do NOT delete or modify the next line of commented-out 404 rules
    #error_page 404/404.html;
    {ssl_config}
    #SSL-END

    #ERROR-PAGE-START  Error page configuration, allowed to be commented, deleted or modified
    #error_page 404 /404.html;
    #error_page 502 /502.html;
    #ERROR-PAGE-END


    #REWRITE-START URL rewrite rule reference, any modification will invalidate the rewrite rules set by the panel
    include {panel_path}/vhost/rewrite/python_{project_name}.conf;
    #REWRITE-END

    # Forbidden files or directories
    location ~* (\.user.ini|\.htaccess|\.htpasswd|\.env.*|\.project|\.bashrc|\.bash_profile|\.bash_logout|\.DS_Store|\.gitignore|\.gitattributes|LICENSE|README\.md|CLAUDE\.md|CHANGELOG\.md|CHANGELOG|CONTRIBUTING\.md|TODO\.md|FAQ\.md|composer\.json|composer\.lock|package(-lock)?\.json|yarn\.lock|pnpm-lock\.yaml|\.\w+~|\.swp|\.swo|\.bak(up)?|\.old|\.tmp|\.temp|\.log|\.sql(\.gz)?|docker-compose\.yml|docker\.env|Dockerfile|\.csproj|\.sln|Cargo\.toml|Cargo\.lock|go\.mod|go\.sum|phpunit\.xml|phpunit\.xml|pom\.xml|build\.gradl|pyproject\.toml|requirements\.txt|application(-\w+)?\.(ya?ml|properties))$
    {{
        return 404;
    }}

    # Forbidden files or directories
    location ~* /(\.git|\.svn|\.bzr|\.vscode|\.claude|\.idea|\.ssh|\.github|\.npm|\.yarn|\.pnpm|\.cache|\.husky|\.turbo|\.next|\.nuxt|node_modules|runtime)/ {{
        return 404;
    }}

    # Directory verification related settings for one-click application for SSL certificate
    location /.well-known/ {{
        root /www/wwwroot/java_node_ssl;
    }}

    # Prohibit putting sensitive files in certificate verification directory
    if ( $uri ~ "^/\.well-known/.*\.(php|jsp|py|js|css|lua|ts|go|zip|tar\.gz|rar|7z|sql|bak)$" ) {{
        return 403;
    }}

    # PROXY-CONF-START >>>
    location ~ /purge(/.*) {{
        proxy_cache_purge cache_one {host}$request_uri$is_args$args;
    }}

    {proxy}

    # PROXY-CONF-END <<<

    access_log  {log_path}/{project_name}.log;
    error_log  {log_path}/{project_name}.error.log;
}}