图片https
This commit is contained in:
@ -24,6 +24,7 @@ public class DeviceConstants {
|
||||
/**
|
||||
* 文件访问IP地址
|
||||
*/
|
||||
public static final String FILE_ACCESS_IP = "http://fuyuanshen.com:81/";
|
||||
// public static final String FILE_ACCESS_IP = "http://fuyuanshen.com:81/";
|
||||
public static final String FILE_ACCESS_IP = "https://fuyuanshen.com/";
|
||||
|
||||
}
|
||||
|
@ -149,4 +149,5 @@ file:
|
||||
avatarMaxSize: 5
|
||||
device:
|
||||
pic: /home/eladmin/file/ #设备图片存储路径
|
||||
ip: http://fuyuanshen.com:81/ #服务器地址
|
||||
#ip: http://fuyuanshen.com:81/ #服务器地址
|
||||
ip: https://fuyuanshen.com/ #服务器地址
|
||||
|
119
fys-system/src/main/resources/nginx.conf
Normal file
119
fys-system/src/main/resources/nginx.conf
Normal file
@ -0,0 +1,119 @@
|
||||
#user nobody;
|
||||
worker_processes 1;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
|
||||
# 主站 HTTP 配置 (恢复访问)
|
||||
server {
|
||||
listen 80;
|
||||
server_name fuyuanshen.com;
|
||||
|
||||
location / {
|
||||
alias /usr/local/nginx/html/web/;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
location /sys/ {
|
||||
alias /usr/local/nginx/html/sys/;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root html;
|
||||
}
|
||||
}
|
||||
|
||||
# 图片服务 (HTTP)
|
||||
server {
|
||||
listen 81;
|
||||
server_name 47.107.152.87;
|
||||
|
||||
location /images/ {
|
||||
alias /home/eladmin/file/;
|
||||
autoindex off;
|
||||
}
|
||||
}
|
||||
|
||||
# Gitea 服务 (HTTP)
|
||||
server {
|
||||
listen 80;
|
||||
server_name git.fuyuanshen.com;
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:3000;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
# API 服务 (HTTP - 恢复访问)
|
||||
server {
|
||||
listen 80;
|
||||
server_name api.fuyuanshen.com;
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:8000/;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
# 主站 HTTPS (可选)
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name fuyuanshen.com;
|
||||
|
||||
ssl_certificate /usr/local/nginx/conf/cert/fuyuanshen.com.pem;
|
||||
ssl_certificate_key /usr/local/nginx/conf/cert/fuyuanshen.com.key;
|
||||
|
||||
ssl_session_cache shared:SSL:1m;
|
||||
ssl_session_timeout 5m;
|
||||
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
|
||||
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
location / {
|
||||
alias /usr/local/nginx/html/web/;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
location /sys/ {
|
||||
alias /usr/local/nginx/html/sys/;
|
||||
}
|
||||
}
|
||||
|
||||
# API 服务 HTTPS (解决原始问题)
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name api.fuyuanshen.com;
|
||||
|
||||
ssl_certificate /usr/local/nginx/conf/cert/fuyuanshen.com.pem;
|
||||
ssl_certificate_key /usr/local/nginx/conf/cert/fuyuanshen.com.key;
|
||||
|
||||
ssl_session_cache shared:SSL:1m;
|
||||
ssl_session_timeout 5m;
|
||||
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
|
||||
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:8000/;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user