Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bkunyun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bkunyun
Commits
3d942c2f
Commit
3d942c2f
authored
Jul 13, 2022
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hotfix-nginx-port' into 'master'
nginx See merge request
!6
parents
16e0cd5f
4e7d992e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
164 additions
and
164 deletions
+164
-164
nginx_20000_cn.conf
nginx/nginx_20000_cn.conf
+80
-80
nginx_test_20000.conf
nginx/nginx_test_20000.conf
+84
-84
No files found.
nginx/nginx_20000_cn.conf
View file @
3d942c2f
error_log
/
var
/
log
/
nginx
/
error
.
log
warn
;
error_log
/
var
/
log
/
nginx
/
error
.
log
warn
;
pid
/
var
/
log
/
nginx
/
nginx
.
pid
;
pid
/
var
/
log
/
nginx
/
nginx
.
pid
;
events
{
events
{
worker_connections
1024
;
worker_connections
1024
;
}
}
http
{
http
{
include
/
etc
/
nginx
/
mime
.
types
;
include
/
etc
/
nginx
/
mime
.
types
;
default_type
application
/
octet
-
stream
;
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" "$upstream_addr"'
;
log_format
main
'$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" "$upstream_addr"'
;
access_log
/
var
/
log
/
nginx
/
access
.
log
main
;
access_log
/
var
/
log
/
nginx
/
access
.
log
main
;
sendfile
on
;
sendfile
on
;
client_max_body_size
100
M
;
client_max_body_size
100
M
;
server
{
server
{
server_name
bkunyun
.
com
www
.
bkunyun
.
com
;
server_name
bkunyun
.
com
www
.
bkunyun
.
com
;
listen
20000
ssl
http2
;
listen
20000
ssl
http2
;
ssl_certificate
/
cert
/
bkunyun
.
com
.
pem
;
ssl_certificate
/
cert
/
bkunyun
.
com
.
pem
;
ssl_certificate_key
/
cert
/
bkunyun
.
com
.
key
;
ssl_certificate_key
/
cert
/
bkunyun
.
com
.
key
;
ssl_session_timeout
5
m
;
ssl_session_timeout
5
m
;
ssl_ciphers
ECDHE
-
RSA
-
AES128
-
GCM
-
SHA256
:
ECDHE
:
ECDH
:
AES
:
HIGH
:!
NULL
:!
aNULL
:!
MD5
:!
ADH
:!
RC4
;
ssl_ciphers
ECDHE
-
RSA
-
AES128
-
GCM
-
SHA256
:
ECDHE
:
ECDH
:
AES
:
HIGH
:!
NULL
:!
aNULL
:!
MD5
:!
ADH
:!
RC4
;
ssl_protocols
TLSv1
TLSv1
.
1
TLSv1
.
2
;
ssl_protocols
TLSv1
TLSv1
.
1
TLSv1
.
2
;
ssl_prefer_server_ciphers
on
;
ssl_prefer_server_ciphers
on
;
root
/
var
/
www
;
root
/
var
/
www
;
index
index
.
html
index
.
htm
;
index
index
.
html
index
.
htm
;
resolver
127
.
0
.
0
.
11
valid
=
10
s
;
resolver
127
.
0
.
0
.
11
valid
=
10
s
;
location
/ {
location
/ {
try_files
$
uri
/
v3
/
index
.
html
;
try_files
$
uri
/
v3
/
index
.
html
;
index
/
v3
/
index
.
html
;
index
/
v3
/
index
.
html
;
add_header
Access
-
Control
-
Allow
-
Origin
*;
add_header
Access
-
Control
-
Allow
-
Origin
*;
add_header
Access
-
Control
-
Allow
-
Methods
'GET, POST, OPTIONS'
;
add_header
Access
-
Control
-
Allow
-
Methods
'GET, POST, OPTIONS'
;
add_header
Access
-
Control
-
Allow
-
Headers
'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization'
;
add_header
Access
-
Control
-
Allow
-
Headers
'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization'
;
}
}
location
^~ /
v3
/ {
location
^~ /
v3
/ {
try_files
$
uri
/
v3
/
index
.
html
try_files
$
uri
/
v3
/
index
.
html
index
/
v3
/
index
.
html
;
index
/
v3
/
index
.
html
;
}
}
location
^~ /
accounts
/ {
location
^~ /
accounts
/ {
set
$
accountservice
"http://account-service:6000"
;
set
$
accountservice
"http://account-service:6000"
;
proxy_pass
$
accountservice
;
proxy_pass
$
accountservice
;
proxy_set_header
Host
$
host
;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
}
}
location
^~ /
uaa
/ {
location
^~ /
uaa
/ {
set
$
authservice
"http://auth-service:5000"
;
set
$
authservice
"http://auth-service:5000"
;
proxy_pass
$
authservice
;
proxy_pass
$
authservice
;
proxy_set_header
Host
$
host
;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
}
}
location
^~ /
intelligroup
/ {
location
^~ /
intelligroup
/ {
set
$
intelliservice
"http://intelligroup-service:8000"
;
set
$
intelliservice
"http://intelligroup-service:8000"
;
proxy_pass
$
intelliservice
;
proxy_pass
$
intelliservice
;
proxy_set_header
Host
$
host
;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
}
}
location
^~ /
vps
/ {
location
^~ /
vps
/ {
set
$
intellivps
"http://intelligroup-vps:10000"
;
set
$
intellivps
"http://intelligroup-vps:10000"
;
proxy_pass
$
intellivps
;
proxy_pass
$
intellivps
;
proxy_set_header
Host
$
host
;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
}
}
location
/
zhihu
-
xg
/ {
location
/
zhihu
-
xg
/ {
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Forwarded
-
For
$
proxy_add_x_forwarded_for
;
proxy_set_header
X
-
Forwarded
-
For
$
proxy_add_x_forwarded_for
;
proxy_http_version
1
.
1
;
proxy_http_version
1
.
1
;
proxy_pass
https
://
xg
.
zhihu
.
com
/;
proxy_pass
https
://
xg
.
zhihu
.
com
/;
}
}
location
^~ /
c3app
/ {
location
^~ /
c3app
/ {
set
$
c3app
"http://c3-app:6600"
;
set
$
c3app
"http://c3-app:6600"
;
proxy_pass
$
c3app
;
proxy_pass
$
c3app
;
proxy_set_header
Host
$
host
;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
}
}
location
^~ /
ecc
/ {
location
^~ /
ecc
/ {
set
$
ecc
"http://c3-ecc-app:6700"
;
set
$
ecc
"http://c3-ecc-app:6700"
;
proxy_pass
$
ecc
;
proxy_pass
$
ecc
;
proxy_set_header
Host
$
host
;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
}
}
location
^~ /
cpp
/ {
location
^~ /
cpp
/ {
proxy_set_header
Host
$
host
;
proxy_set_header
Host
$
host
;
...
@@ -89,8 +89,8 @@ http {
...
@@ -89,8 +89,8 @@ http {
location
^~ /
ip
/ {
location
^~ /
ip
/ {
set
$
c3ip
"http://c3-ip-app:6800"
;
set
$
c3ip
"http://c3-ip-app:6800"
;
proxy_pass
$
c3ip
;
proxy_pass
$
c3ip
;
proxy_set_header
Host
$
host
;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
}
}
location
^~ /
angelia
/ {
location
^~ /
angelia
/ {
set
$
angelia
"http://angelia:10002"
;
set
$
angelia
"http://angelia:10002"
;
...
@@ -151,9 +151,9 @@ http {
...
@@ -151,9 +151,9 @@ http {
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
Upgrade
$
http_upgrade
;
proxy_set_header
Upgrade
$
http_upgrade
;
proxy_set_header
Connection
"upgrade"
;
proxy_set_header
Connection
"upgrade"
;
proxy_connect_timeout
4
s
;
#配置点1
proxy_connect_timeout
4
s
;
#配置点1
proxy_read_timeout
180
s
;
#配置点2,如果没效,可以考虑这个时间配置长一点
proxy_read_timeout
180
s
;
#配置点2,如果没效,可以考虑这个时间配置长一点
proxy_send_timeout
12
s
;
#配置点3
proxy_send_timeout
12
s
;
#配置点3
set
$
imapp
"http://im-app:8081"
;
set
$
imapp
"http://im-app:8081"
;
proxy_pass
$
imapp
;
proxy_pass
$
imapp
;
}
}
...
@@ -193,24 +193,24 @@ http {
...
@@ -193,24 +193,24 @@ http {
}
}
location
^~ /
wordpress
/ {
location
^~ /
wordpress
/ {
proxy_set_header
Host
$
host
;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_connect_timeout
300
s
;
proxy_connect_timeout
300
s
;
proxy_send_timeout
300
s
;
proxy_send_timeout
300
s
;
proxy_read_timeout
300
s
;
proxy_read_timeout
300
s
;
set
$
wordpress
"http://cloudam-wordpress"
;
set
$
wordpress
"http://cloudam-wordpress"
;
#rewrite ^/wordpress/(.*)$ /$1 break;
#rewrite ^/wordpress/(.*)$ /$1 break;
proxy_pass
$
wordpress
;
proxy_pass
$
wordpress
;
}
}
location
^~ /
wp
-
content
/ {
location
^~ /
wp
-
content
/ {
proxy_set_header
Host
$
host
;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_connect_timeout
300
s
;
proxy_connect_timeout
300
s
;
proxy_send_timeout
300
s
;
proxy_send_timeout
300
s
;
proxy_read_timeout
300
s
;
proxy_read_timeout
300
s
;
set
$
wordpress
"http://cloudam-wordpress"
;
set
$
wordpress
"http://cloudam-wordpress"
;
#rewrite ^/wordpress/(.*)$ /$1 break;
#rewrite ^/wordpress/(.*)$ /$1 break;
proxy_pass
$
wordpress
;
proxy_pass
$
wordpress
;
}
}
location
^~ /
wp
-
admin
/ {
location
^~ /
wp
-
admin
/ {
proxy_set_header
Host
$
host
;
proxy_set_header
Host
$
host
;
...
@@ -233,16 +233,6 @@ http {
...
@@ -233,16 +233,6 @@ http {
proxy_pass
$
wordpress
;
proxy_pass
$
wordpress
;
}
}
location
^~ /
wp
-
json
/ {
location
^~ /
wp
-
json
/ {
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_connect_timeout
300
s
;
proxy_send_timeout
300
s
;
proxy_read_timeout
300
s
;
set
$
wordpress
"http://cloudam-wordpress"
;
#rewrite ^/wordpress/(.*)$ /$1 break;
proxy_pass
$
wordpress
;
}
location
~ .*\.
php
$ {
proxy_set_header
Host
$
host
;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_connect_timeout
300
s
;
proxy_connect_timeout
300
s
;
...
@@ -252,9 +242,19 @@ http {
...
@@ -252,9 +242,19 @@ http {
#rewrite ^/wordpress/(.*)$ /$1 break;
#rewrite ^/wordpress/(.*)$ /$1 break;
proxy_pass
$
wordpress
;
proxy_pass
$
wordpress
;
}
}
# Any route containing a file extension (e.g. /devicesfile.js)
location
~ .*\.
php
$ {
location
~ ^.+\..+$ {
proxy_set_header
Host
$
host
;
try_files
$
uri
=
404
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
}
proxy_connect_timeout
300
s
;
}
proxy_send_timeout
300
s
;
proxy_read_timeout
300
s
;
set
$
wordpress
"http://cloudam-wordpress"
;
#rewrite ^/wordpress/(.*)$ /$1 break;
proxy_pass
$
wordpress
;
}
# Any route containing a file extension (e.g. /devicesfile.js)
location
~ ^.+\..+$ {
try_files
$
uri
=
404
;
}
}
}
}
nginx/nginx_test_20000.conf
View file @
3d942c2f
error_log
/
var
/
log
/
nginx
/
error
.
log
warn
;
error_log
/
var
/
log
/
nginx
/
error
.
log
warn
;
pid
/
var
/
log
/
nginx
/
nginx
.
pid
;
pid
/
var
/
log
/
nginx
/
nginx
.
pid
;
events
{
events
{
worker_connections
1024
;
worker_connections
1024
;
}
}
http
{
http
{
include
/
etc
/
nginx
/
mime
.
types
;
include
/
etc
/
nginx
/
mime
.
types
;
default_type
application
/
octet
-
stream
;
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" "$upstream_addr"'
;
log_format
main
'$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" "$upstream_addr"'
;
access_log
/
var
/
log
/
nginx
/
access
.
log
main
;
access_log
/
var
/
log
/
nginx
/
access
.
log
main
;
sendfile
on
;
sendfile
on
;
client_max_body_size
100
M
;
client_max_body_size
100
M
;
#tcp_nopush on;
#tcp_nopush on;
server
{
server
{
listen
20000
;
listen
20000
;
root
/
var
/
www
;
root
/
var
/
www
;
index
index
.
html
index
.
htm
;
index
index
.
html
index
.
htm
;
resolver
127
.
0
.
0
.
11
valid
=
10
s
;
resolver
127
.
0
.
0
.
11
valid
=
10
s
;
location
/ {
location
/ {
try_files
$
uri
/
v3
/
index
.
html
;
try_files
$
uri
/
v3
/
index
.
html
;
index
/
v3
/
index
.
html
;
index
/
v3
/
index
.
html
;
#add_header Access-Control-Allow-Origin *;
#add_header Access-Control-Allow-Origin *;
add_header
Access
-
Control
-
Allow
-
Origin
*;
add_header
Access
-
Control
-
Allow
-
Origin
*;
add_header
Access
-
Control
-
Allow
-
Methods
'GET, POST, OPTIONS'
;
add_header
Access
-
Control
-
Allow
-
Methods
'GET, POST, OPTIONS'
;
add_header
Access
-
Control
-
Allow
-
Headers
'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization'
;
add_header
Access
-
Control
-
Allow
-
Headers
'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization'
;
}
}
location
^~ /
v3
/ {
location
^~ /
v3
/ {
try_files
$
uri
/
v3
/
index
.
html
try_files
$
uri
/
v3
/
index
.
html
index
/
v3
/
index
.
html
;
index
/
v3
/
index
.
html
;
}
}
location
^~ /
accounts
/ {
location
^~ /
accounts
/ {
set
$
accountservice
"http://account-service:6000"
;
set
$
accountservice
"http://account-service:6000"
;
proxy_pass
$
accountservice
;
proxy_pass
$
accountservice
;
proxy_set_header
Host
$
host
;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
}
}
location
^~ /
uaa
/ {
location
^~ /
uaa
/ {
set
$
authservice
"http://auth-service:5000"
;
set
$
authservice
"http://auth-service:5000"
;
proxy_pass
$
authservice
;
proxy_pass
$
authservice
;
proxy_set_header
Host
$
host
;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
}
}
location
^~ /
intelligroup
/ {
location
^~ /
intelligroup
/ {
set
$
intelliservice
"http://intelligroup-service:8000"
;
set
$
intelliservice
"http://intelligroup-service:8000"
;
proxy_pass
$
intelliservice
;
proxy_pass
$
intelliservice
;
proxy_set_header
Host
$
host
;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
}
}
location
^~ /
vps
/ {
location
^~ /
vps
/ {
set
$
intellivps
"http://intelligroup-vps:10000"
;
set
$
intellivps
"http://intelligroup-vps:10000"
;
proxy_pass
$
intellivps
;
proxy_pass
$
intellivps
;
proxy_set_header
Host
$
host
;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
}
}
location
/
zhihu
-
xg
/ {
location
/
zhihu
-
xg
/ {
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Forwarded
-
For
$
proxy_add_x_forwarded_for
;
proxy_set_header
X
-
Forwarded
-
For
$
proxy_add_x_forwarded_for
;
proxy_http_version
1
.
1
;
proxy_http_version
1
.
1
;
proxy_pass
https
://
xg
.
zhihu
.
com
/;
proxy_pass
https
://
xg
.
zhihu
.
com
/;
}
}
location
^~ /
c3app
/ {
location
^~ /
c3app
/ {
set
$
c3app
"http://c3-app:6600"
;
set
$
c3app
"http://c3-app:6600"
;
proxy_pass
$
c3app
;
proxy_pass
$
c3app
;
proxy_set_header
Host
$
host
;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
}
}
location
^~ /
ecc
/ {
location
^~ /
ecc
/ {
set
$
ecc
"http://c3-ecc-app:6700"
;
set
$
ecc
"http://c3-ecc-app:6700"
;
proxy_pass
$
ecc
;
proxy_pass
$
ecc
;
proxy_set_header
Host
$
host
;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
}
}
location
^~ /
cpp
/ {
location
^~ /
cpp
/ {
proxy_set_header
Host
$
host
;
proxy_set_header
Host
$
host
;
...
@@ -84,8 +84,8 @@ http {
...
@@ -84,8 +84,8 @@ http {
location
^~ /
ip
/ {
location
^~ /
ip
/ {
set
$
c3ip
"http://c3-ip-app:6800"
;
set
$
c3ip
"http://c3-ip-app:6800"
;
proxy_pass
$
c3ip
;
proxy_pass
$
c3ip
;
proxy_set_header
Host
$
host
;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
}
}
location
^~ /
angelia
/ {
location
^~ /
angelia
/ {
set
$
angelia
"http://angelia:10002"
;
set
$
angelia
"http://angelia:10002"
;
...
@@ -146,9 +146,9 @@ http {
...
@@ -146,9 +146,9 @@ http {
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
Upgrade
$
http_upgrade
;
proxy_set_header
Upgrade
$
http_upgrade
;
proxy_set_header
Connection
"upgrade"
;
proxy_set_header
Connection
"upgrade"
;
proxy_connect_timeout
4
s
;
#配置点1
proxy_connect_timeout
4
s
;
#配置点1
proxy_read_timeout
180
s
;
#配置点2,如果没效,可以考虑这个时间配置长一点
proxy_read_timeout
180
s
;
#配置点2,如果没效,可以考虑这个时间配置长一点
proxy_send_timeout
12
s
;
#配置点3
proxy_send_timeout
12
s
;
#配置点3
set
$
imapp
"http://im-app:8081"
;
set
$
imapp
"http://im-app:8081"
;
proxy_pass
$
imapp
;
proxy_pass
$
imapp
;
}
}
...
@@ -169,7 +169,7 @@ http {
...
@@ -169,7 +169,7 @@ http {
set
$
grafana
"http://grafana:3000"
;
set
$
grafana
"http://grafana:3000"
;
proxy_pass
$
grafana
;
proxy_pass
$
grafana
;
}
}
location
^~ /
config
/ {
location
^~ /
config
/ {
proxy_set_header
Host
$
host
;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_connect_timeout
300
s
;
proxy_connect_timeout
300
s
;
...
@@ -186,24 +186,24 @@ http {
...
@@ -186,24 +186,24 @@ http {
}
}
location
^~ /
wordpress
/ {
location
^~ /
wordpress
/ {
proxy_set_header
Host
$
host
;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_connect_timeout
300
s
;
proxy_connect_timeout
300
s
;
proxy_send_timeout
300
s
;
proxy_send_timeout
300
s
;
proxy_read_timeout
300
s
;
proxy_read_timeout
300
s
;
set
$
wordpress
"http://cloudam-wordpress"
;
set
$
wordpress
"http://cloudam-wordpress"
;
#rewrite ^/wordpress/(.*)$ /$1 break;
#rewrite ^/wordpress/(.*)$ /$1 break;
proxy_pass
$
wordpress
;
proxy_pass
$
wordpress
;
}
}
location
^~ /
wp
-
content
/ {
location
^~ /
wp
-
content
/ {
proxy_set_header
Host
$
host
;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_connect_timeout
300
s
;
proxy_connect_timeout
300
s
;
proxy_send_timeout
300
s
;
proxy_send_timeout
300
s
;
proxy_read_timeout
300
s
;
proxy_read_timeout
300
s
;
set
$
wordpress
"http://cloudam-wordpress"
;
set
$
wordpress
"http://cloudam-wordpress"
;
#rewrite ^/wordpress/(.*)$ /$1 break;
#rewrite ^/wordpress/(.*)$ /$1 break;
proxy_pass
$
wordpress
;
proxy_pass
$
wordpress
;
}
}
location
^~ /
wp
-
admin
/ {
location
^~ /
wp
-
admin
/ {
proxy_set_header
Host
$
host
;
proxy_set_header
Host
$
host
;
...
@@ -226,16 +226,6 @@ http {
...
@@ -226,16 +226,6 @@ http {
proxy_pass
$
wordpress
;
proxy_pass
$
wordpress
;
}
}
location
^~ /
wp
-
json
/ {
location
^~ /
wp
-
json
/ {
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_connect_timeout
300
s
;
proxy_send_timeout
300
s
;
proxy_read_timeout
300
s
;
set
$
wordpress
"http://cloudam-wordpress"
;
#rewrite ^/wordpress/(.*)$ /$1 break;
proxy_pass
$
wordpress
;
}
location
~ .*\.
php
$ {
proxy_set_header
Host
$
host
;
proxy_set_header
Host
$
host
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_connect_timeout
300
s
;
proxy_connect_timeout
300
s
;
...
@@ -245,9 +235,19 @@ http {
...
@@ -245,9 +235,19 @@ http {
#rewrite ^/wordpress/(.*)$ /$1 break;
#rewrite ^/wordpress/(.*)$ /$1 break;
proxy_pass
$
wordpress
;
proxy_pass
$
wordpress
;
}
}
# Any route containing a file extension (e.g. /devicesfile.js)
location
~ .*\.
php
$ {
location
~ ^.+\..+$ {
proxy_set_header
Host
$
host
;
try_files
$
uri
=
404
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
}
proxy_connect_timeout
300
s
;
}
proxy_send_timeout
300
s
;
proxy_read_timeout
300
s
;
set
$
wordpress
"http://cloudam-wordpress"
;
#rewrite ^/wordpress/(.*)$ /$1 break;
proxy_pass
$
wordpress
;
}
# Any route containing a file extension (e.g. /devicesfile.js)
location
~ ^.+\..+$ {
try_files
$
uri
=
404
;
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment