nginx
程序员文章站
2022-07-12 17:21:26
...
nginx.conf文件配置:
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
include /*.conf;
}
pxy-api-dev-pc.conf文件下配置:
server {
listen 10001;
server_name localhost;
location / {
root d:\source\WRK-pages\pc;
}
location /api {
proxy_pass http://10.64.4.101:8003/api;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api/accreditUserGuides/list {
proxy_pass http://127.0.0.1:8003/api/accreditUserGuides/list;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api/accreditUserGuides/saveUpdate {
proxy_pass http://127.0.0.1:8003/api/accreditUserGuides/saveUpdate;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api/accreditUserGuides/published {
proxy_pass http://127.0.0.1:8003/api/accreditUserGuides/published;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api/accreditUserGuides/clonePublished {
proxy_pass http://127.0.0.1:8003/api/accreditUserGuides/clonePublished ;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api/accreditUserGuides/deleteGuides {
proxy_pass http://127.0.0.1:8003/api/accreditUserGuides/deleteGuides ;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api/guides/getAccreditOrgsMsg {
proxy_pass http://127.0.0.1:8010/api/guides/getAccreditOrgsMsg ;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
阿里云登录用户名:taozhangyi1219
地址:112.74.40.101
密码:Tzy****
数据库:rm-wz9kk1x84g083gg4co.mysql.rds.aliyuncs.com
root
Aa123456
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
include /*.conf;
}
pxy-api-dev-pc.conf文件下配置:
server {
listen 10001;
server_name localhost;
location / {
root d:\source\WRK-pages\pc;
}
location /api {
proxy_pass http://10.64.4.101:8003/api;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api/accreditUserGuides/list {
proxy_pass http://127.0.0.1:8003/api/accreditUserGuides/list;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api/accreditUserGuides/saveUpdate {
proxy_pass http://127.0.0.1:8003/api/accreditUserGuides/saveUpdate;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api/accreditUserGuides/published {
proxy_pass http://127.0.0.1:8003/api/accreditUserGuides/published;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api/accreditUserGuides/clonePublished {
proxy_pass http://127.0.0.1:8003/api/accreditUserGuides/clonePublished ;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api/accreditUserGuides/deleteGuides {
proxy_pass http://127.0.0.1:8003/api/accreditUserGuides/deleteGuides ;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api/guides/getAccreditOrgsMsg {
proxy_pass http://127.0.0.1:8010/api/guides/getAccreditOrgsMsg ;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
阿里云登录用户名:taozhangyi1219
地址:112.74.40.101
密码:Tzy****
数据库:rm-wz9kk1x84g083gg4co.mysql.rds.aliyuncs.com
root
Aa123456
推荐阅读
-
nginx运作php
-
apache前端+nginx后端,nginx如何rewrite正确的地址
-
【已解决】求助centos6 nginx upstream不能转发到我自己定义的内部端口
-
nginx的zabbix 5.0安装部署的方法步骤
-
php升级 - 正在运行中的服务器,如何平滑从php5.2升级到php5.3 ,linux+php-fpm+nginx
-
PHP+FastCGI+Nginx配置PHP运行环境,fastcginginx
-
Linux中Nginx反向代理下的tomcat集群的详解
-
FreeBSD7.0编译安装nginx+php+mysql
-
生产环境之Nginx高可用方案实现过程解析
-
Nginx状态监控以及日志分析详解