Nginx服务器常用配置及命令 Posted on 2020-07-28 | Updated on 2020-07-31 | In work , study | comments: | Visitors: Words count in article: 129 | Reading time ≈ 1 nginx常用指令12345678// 启动start nginx// 重新载入配置文件nginx -s stop// 停止nginx -s reload 用nginx反向代理解决跨域123456789101112131415server { listen 8080; // 开启服务器所需的端口号 server_name localhost; // 服务器名 location / { root E:\url\BusinessCard; // 文件目录 index index.html; // 主页 } // 反向代理 location /igs/ { proxy_redirect off; proxy_pass http://www.guizhou.gov.cn/igs/; // } // 反向代理配置以后,在前端的请求接口就不要写完整地址了,只需要写上/igs/...即可 error_page 500 502 503 504 /50x.html; } Post author: 视也 Post link: http://www.noh55iw.com/nginx/ Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 3.0 unless stating additionally.