網站首頁 編程語言 正文
注意第一個app需要在index引入靜態文件都需要加上app,不然加載出index文件,無法加載index里面關聯的靜態文件
#user nobody;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
client_max_body_size 100m;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name 192.168.16.34;
#charset koi8-r;
#access_log logs/host.access.log main;
location /app {
alias /opt/app/beforeWeb/client;
index index.html index.htm;
try_files $uri $uri/ /app/index.html;
}
location / {
root /opt/app/beforeWeb/web-pc;
try_files $uri $uri/ /index.html;
index index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location /api {
proxy_pass http://192.168.16.34:8080/demo/sys;
}
location /lxminiapp {
proxy_pass http://192.168.16.34:8080/demo/sys;
}
}
# server {
# listen 443 ssl;
# server_name lhxn.gdhdxin.com;
# ssl_certificate /opt/app/nginx/nginx/ssl/xx.yy.com_bundle.pem;
# ssl_certificate_key /opt/app/nginx/nginx/ssl/xx.yy.com.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 5m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# root /opt/app/web-pc;
# location / {
# try_files $uri $uri/ @router;
# index index.html;
# }
# location @router{
# rewrite ^.*$ /index.html last;
# }
# location /api {
# proxy_pass http://127.0.0.1:8080/jeecg-boot/sys;
# }
# location /lxminiapp {
# proxy_pass http://127.0.0.1:8080/jeecg-boot/sys;
# }
# location /dg/view {
# proxy_pass http://127.0.0.1:8080/jeecg-boot;
# }
# location /jeecg-boot2/sys {
# proxy_pass http://127.0.0.1:8080/jeecg-boot/sys;
# }
# location /abc {
# alias /opt/app/nginx/;
# autoindex on;
# }
# }
}
原文鏈接:https://blog.csdn.net/qq_19891197/article/details/136004896
- 上一篇:沒有了
- 下一篇:沒有了
相關推薦
- 2022-06-12 PostgreSQL數據庫的基本查詢操作_PostgreSQL
- 2022-08-10 Oracle數據庫如何使用exp和imp方式導數據_oracle
- 2022-10-06 Iptables防火墻connlimit與time模塊擴展匹配規則_安全相關
- 2022-08-28 centos 單機版redis安裝與數據持久化
- 2022-09-13 c++11中的noexcept關鍵字_C 語言
- 2022-10-14 CompletableFuture解決多線程返回結果問題
- 2022-04-09 關于C語言動態內存管理介紹_C 語言
- 2022-07-11 gstreamer的消息傳遞機制
- 欄目分類
-
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支