1 Star 0 Fork 0

萧靖/document-images

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
nginx.conf 5.79 KB
一键复制 编辑 原始数据 按行查看 历史
萧靖 提交于 2021-10-08 01:31 . picgo commit
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 601 default_server;
server_name _;
location / {
#root D:/Tools/code/bgpromotion/core;
root D:/Tools/code/ouser-center/ouser-center-web/src/main/resources/static;
index index.html index.htm;
}
}
server {
listen 80;
#修改成后台admin对应域名,目前可以使用下面的通用路径
server_name *.com.cn;
#charset koi8-r;
access_log logs/host.access.log main;
#http://127.0.0.1:8082/ouser-web/ 该路径根据本地启动的tomcat路径可替换
#/api/ouser-web/为代理开发环境的路径,可以谷歌开发工具查看开发环境的接口路径中找到,注意路径有api的需要再加层api路径
#location ^~ /oms-static {
# index index.html;
# alias D:\workspace\oms-static\dist;
# break;
#}
#location ^~ /back-product-service/ {
# proxy_pass http://127.0.0.1:8088/back-product-service/;
# proxy_set_header Host $host:$server_port;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# break;
#}
location ^~ /back-product-static/ {
proxy_pass http://127.0.0.1:8080/back-product-static/;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
break;
}
#location ^~ /back-product-web/ {
# proxy_pass http://127.0.0.1:8080/product-web/;
# proxy_set_header Host $host:$server_port;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# break;
#}
#location ^~ /back-merchant-web/ {
# proxy_pass http://127.0.0.1:8082/back-merchant-web/;
# proxy_set_header Host $host:$server_port;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# break;
#}
#location ^~ /merchant-static/ {
# proxy_pass http://127.0.0.1:8083/merchant-static/;
# proxy_set_header Host $host:$server_port;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# break;
#}
#location ^~ /oms-web/ {
# proxy_pass http://127.0.0.1:8084/oms-web/;
# proxy_set_header Host $host:$server_port;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# break;
#}
#location ^~ /oms-api/ {
# proxy_pass http://127.0.0.1:8080/oms-api/;
# proxy_set_header Host $host:$server_port;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# break;
#}
#
#location ^~ /oms-api-web/ {
# proxy_pass http://127.0.0.1:8080/oms-api-web/;
# proxy_set_header Host $host:$server_port;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# break;
#}
#location ^~ /api/opms-web/ {
# proxy_pass http://127.0.0.1:8080/opms-web/;
# proxy_set_header Host $host:$server_port;
# break;
#}
#location ^~ /ody-channel-web/ {
# proxy_pass http://127.0.0.1:8080/ody-channel-web/;
# proxy_set_header Host $host:$server_port;
# break;
#}
#location ^~ /ouser-web/ {
# proxy_pass http://127.0.0.1:8091/ouser-service/;
# proxy_set_header Host $host:$server_port;
# break;
#}
#location ^~ /back-finance-web/ {
# proxy_pass http://127.0.0.1:8080/back-finance-web/;
# proxy_set_header Host $host:$server_port;
# break;
#}
#location ^~ /api/social-web/ {
# proxy_pass http://127.0.0.1:8092/social-web/;
# proxy_set_header Host $host:$server_port;
# break;
#}
#location ^~ /frontier-trade-web/ {
# proxy_pass http://127.0.0.1:8080/frontier-trade-web/;
# proxy_set_header Host $host:$server_port;
# break;
#}
location ^~ / {
index index.html;
#ip需要根据自己的实际代理的环境ip替换,示例中给的是2.7的开发环境ip,一般不需要改,默认只在开发环境调试
proxy_pass http://10.224.16.115/;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
break;
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chanel-net/document-images.git
git@gitee.com:chanel-net/document-images.git
chanel-net
document-images
document-images
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385