欢迎来访JreCms,网站建设及模板提供商!
微信
在线客服QQ:644080923
收藏本站
帮助中心
关于我们
网站模板
网站模板
客户案例
建站教程
热搜:
代码授权
网站模板
客户案例
服务中心
建站教程
所有产品分类
网站模板
新闻资讯
博客媒体
图库图片
网络公司
信息科技
科技产品
客户案例
企业官网
综合门户
新闻媒体
购物商城
服务中心
系统部署
宝塔部署
证书安装
ICP备案
网站首页
网站模板
新闻资讯
博客媒体
图库图片
网络公司
信息科技
科技产品
客户案例
企业官网
综合门户
新闻媒体
购物商城
服务中心
系统部署
宝塔部署
证书安装
ICP备案
更多
建站教程
cms教程
cms文档
服务器教程
数据库教程
资源下载
您现在的位置:
网站首页
>
服务器教程
>
nginx配置文件
发布时间:2022-03-18
热度: ℃
```java #user nobody; worker_processes 2; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 4096; } 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; upstream bpi { # hash $request_uri; server localhost:9999; } upstream nacos{ server localhost:8848; } server { listen 8088 ssl; server_name www.jrecms.com; ssl_certificate cert/cert.pem; ssl\_certificate\_key cert/cert.key; ssl\_session\_cache shared:SSL:1m; ssl\_session\_timeout 5m; ssl_ciphers HIGH:!aNULL:!MD5; ssl\_prefer\_server_ciphers on; #charset koi8-r; #access_log logs/host.access.log main; location / { root html/dist; index index.html index.htm; if (!-e $request_filename) { rewrite ^(.*)$ /index.html?s=$1 last; break; } } location ^~ /dkp/ { root html; index index.html index.htm; proxy_pass http://bpi/; 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; proxy\_set\_header Cookie $http_cookie; proxy\_set\_header X-Forwarded-Proto https; proxy\_http\_version 1.1; client\_max\_body_size 2048m; } location ^~ /nacos/ { root html; index index.html index.htm; proxy_pass http://nacos; 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; proxy\_set\_header Cookie $http_cookie; proxy\_set\_header X-Forwarded-Proto https; proxy\_http\_version 1.1; } location ^~ /wiki/ { root html; index index.html index.htm; proxy_pass http://127.0.0.1:8081; 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; proxy\_set\_header Cookie $http_cookie; proxy\_set\_header X-Forwarded-Proto https; proxy\_http\_version 1.1; } } # server { # listen 9999; # server_name bpi.mgi-tech.com; # location / { # root html; # index index.html index.htm; # proxy_pass http://bpi; # 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; # proxy\_set\_header Cookie $http_cookie; # proxy\_set\_header X-Forwarded-Proto https; # proxy\_http\_version 1.1; # proxy\_set\_header Upgrade $http_upgrade; # proxy\_set\_header Connection "upgrade"; # client\_max\_body_size 2048m; # proxy_buffering off; # } # } # another virtual host using mix of IP-, name-, and port-based configuration # #server { # listen 8000; # listen somename:8080; # server_name somename alias another.alias; # location / { # root html; # index index.html index.htm; # } #} # HTTPS server # #server { # listen 443 ssl; # server_name localhost; # ssl_certificate cert.pem; # ssl\_certificate\_key cert.key; # ssl\_session\_cache shared:SSL:1m; # ssl\_session\_timeout 5m; # ssl_ciphers HIGH:!aNULL:!MD5; # ssl\_prefer\_server_ciphers on; # location / { # root html; # index index.html index.htm; # } #} } ```
上一篇:无
下一篇:无
相关阅读
linux scp命令并指定端口
宝塔部署Java系统(不与PHP冲突)
此网站无法提供安全连接(客户端和服务器不支持一般 SSL 协议版本或加密套件。)--TLS 1.1/TLS 1.2配置
linux 安装jdk 8u351
linux 安装mysql 5.7.38
linux 安装nginx 1.20.2
linux查询端口号对应的服务名
Docker安装Mysql5.7
QQ在线咨询
售前客服
微信客服
工作日 9:00-18:00