nginx配置

nginx配置,第1张

server {
        listen       端口号;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   要访问文件所存放的地址;
            index  index.html index.htm;
            proxy_set_header Host $host;
        }
        
		# 跨域请求
		location  /prod-api {
                 root   要访问文件所存放的地址;
                 proxy_pass 请求的地址;
        }
        
		error_page   500 502 503 504  /50x.html;
		location = /50x.html {
				root   要访问文件所存放的地址;
		}

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/726562.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-04-26
下一篇2022-04-26

发表评论

登录后才能评论

评论列表(0条)

    保存