Skip to content

Commit 131ace4

Browse files
committed
chore: 云服务器部署配置
1 parent 4afdec2 commit 131ace4

File tree

2 files changed

+50
-1
lines changed

2 files changed

+50
-1
lines changed

.nginx.conf

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
2+
3+
server
4+
{
5+
listen 80;
6+
7+
server_name bd7.hokori.online;
8+
index index.html index.htm index.php;
9+
10+
11+
location / {
12+
rewrite ^(.*)$ https://$host$1 permanent;
13+
}
14+
}
15+
server
16+
{
17+
listen 443 ssl http2;
18+
listen [::]:443 ssl http2;
19+
ssl_certificate cert/bd7.hokori.online.pem;
20+
ssl_certificate_key cert/bd7.hokori.online.key;
21+
server_name bd7.hokori.online;
22+
index index.html index.htm index.php;
23+
root /www/wwwroot/BD7/frontend/build;
24+
#error_page 404 /404.html;
25+
include enable-php.conf;
26+
27+
28+
location / {
29+
30+
root /www/wwwroot/BD7/frontend/build;
31+
}
32+
33+
34+
location /api {
35+
proxy_pass http://localhost:8005;
36+
proxy_http_version 1.1;
37+
proxy_set_header Upgrade $http_upgrade;
38+
proxy_set_header Connection 'upgrade';
39+
proxy_set_header Host $host;
40+
proxy_set_header X-Forwarded-Host $http_host;
41+
proxy_set_header X-Forwarded-Server $host;
42+
proxy_set_header X-Real-IP $remote_addr;
43+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
44+
proxy_cache_bypass $http_upgrade;
45+
}
46+
47+
48+
access_log /www/wwwlogs/access.log;
49+
}

backend/src/bd7.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const sequelizeOptions: Options = {
3434
}
3535

3636
const devConfig = {
37-
port: 8003,
37+
port: 8005,
3838
host: 'http://localhost/',
3939
cryptoConfig: {
4040
// 每次分段加密的字符串最大长度(优先度高于cryptCount字段)

0 commit comments

Comments
 (0)