Skip to content

nginx配置 #29

@taoeer

Description

@taoeer

nginx

server {
        listen       80;
        server_name  snyyy.cn; # 域名
        root         /web;

        location /api/ {
            proxy_pass http://127.0.0.1:3000/; # 改成测试环境api地址(域名)
        }
        
        location / {
                try_files $uri $uri/ /index.html;
        }
        location ~.*\.(html|htm)$ {
                add_header Cache-Control "no-cache";
        }
        location ~\.\w+$ {
                expires 365d;
        }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions