找回密码
 立即注册
查看: 109|回复: 0

nocobase反向代理配置文件

[复制链接]

573

主题

694

回帖

4792

积分

管理员

积分
4792
QQ
发表于 前天 09:46 | 显示全部楼层 |阅读模式
  1. location ^~ /
    ; U5 O1 W$ q& k! E$ M
  2. {
    5 y& s4 _( o- \+ ^" ~) k: ^
  3.         proxy_pass http://localhost:13000;
    ! U( H6 ?  W3 Q, F& `8 ]
  4.         proxy_set_header Host $host;- G* o/ J0 a) w( V. s) G
  5.         proxy_set_header X-Real-IP $remote_addr;% L1 R: H) ^4 e4 E4 c
  6.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;0 o, q# Z1 T( |
  7.         proxy_set_header X-Forwarded-Proto $scheme;; t4 J  c. e2 s: [: H: O) Q0 p1 b; V
  8.         proxy_set_header X-Forwarded-Host $http_host;
    3 [! L! x7 U2 s$ w/ L! m6 q% v
  9.         proxy_set_header X-Forwarded-Port $server_port;4 l+ U( N* U1 f
  10.         proxy_set_header REMOTE-HOST $remote_addr;
    0 F3 ]; F; m0 F! k3 w) T
  11.         proxy_set_header REMOTE-PORT $remote_port;
    3 u5 m& y2 S1 E" a3 w8 N0 x& e
  12.         proxy_set_header Upgrade $http_upgrade;5 q- P0 Q4 L! D) H
  13.         proxy_set_header Connection $connection_upgrade;, l% s% s( u& p2 S: Z* G
  14.         proxy_http_version 1.1;; e/ }7 l8 U! M, [
  15.         add_header X-Cache $upstream_cache_status;
    : g* g5 q5 U$ I- w9 i
  16.         & V2 w1 R6 r) z- P! }; g' I* g
  17.         set $static_fileL7Oj3VcR 0;
    - n& v2 I: f6 l8 m0 U
  18.         if ($uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$") {, M# O; [0 X/ F4 t6 s
  19.                 set $static_fileL7Oj3VcR 1;. G1 p, L, z# e( L
  20.                 expires 1m;( G$ E% }7 o4 z$ |0 _
  21.         }1 o- ~3 V( y8 L1 i. b0 v# ?5 Q  F
  22.         if ($static_fileL7Oj3VcR = 0) {
    ( \: M5 g) d" _' N3 {2 y
  23.                 add_header Cache-Control no-cache;- E; N2 f2 e# g4 N& O2 A. B( B
  24.         }( G9 b& y! ^3 [6 y4 p/ Z: r
  25. }
复制代码
欢迎定制:13928122889
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|通达创业无忧交流社区 ( 粤ICP备2023021749号|粤公网安备 44030402006137号 )

GMT+8, 2026-7-23 05:01 , Processed in 0.011533 second(s), 3 queries , Redis On.

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表