Skip to content

Commit

Permalink
Merge pull request #6 from yangweijie/main
Browse files Browse the repository at this point in the history
  • Loading branch information
cclilshy authored Sep 2, 2024
2 parents c79c426 + 542f976 commit 77eb384
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 20 deletions.
30 changes: 20 additions & 10 deletions docs/02-install/02-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,28 @@ php think p:server {action} {--daemon}
### Nginx参考

```nginx
location / {
try_files $uri $uri/ @backend;
upstream backend{
server 127.0.0.1:8008;
keepalive 10240;
}
location @backend {
proxy_pass http://127.0.0.1:8008;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
server{
listen 80;
server_name tp.xxx.cn;
root /xp/www/tp/public;
access_log off;
location / {
proxy_pass http://backend;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,28 @@ php think p:server {action} {--daemon}
### Nginx Reference

```nginx
location/{
try_files $uri $uri/ @backend;
upstream backend{
server 127.0.0.1:8008;
keepalive 10240;
}
location @backend {
proxy_pass http://127.0.0.1:8008;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
server{
listen 80;
server_name tp.xxx.cn;
root /xp/www/tp/public;
access_log off;
location / {
proxy_pass http://backend;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
}
```

Expand Down

0 comments on commit 77eb384

Please sign in to comment.