有木有完整点的配置里,我这主要是弄那个 nginx 配置弄的不太 6,然后就是安装的时候设置成 https 以后,也没办法测试到底能不能使用,使用的不是默认的 80 和 443,用的是 1101(https)和 1102(http);
已解决(谢谢 D 大佬)
docker 安装
docker run --detach --name solo --network=host \
--env RUNTIME_DB="MYSQL" \
--env JDBC_USERNAME="***" \
--env JDBC_PASSWORD="***" \
--env JDBC_DRIVER="com.mysql.cj.jdbc.Driver" \
--env JDBC_URL="jdbc:mysql://192.168.*.*:3306/***?useUnicode=true&characterEncoding=UTF-8&useSSL=true&serverTimezone=PRC&&allowPublicKeyRetrieval=true" \
b3log/solo --listen_port=1102 --server_scheme=https --server_host=www.***.com --server_port=1101
nginx 配置文件(nginx.conf)
events
{
use epoll;
worker_connections 51200;
multi_accept on;
}
http{
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.1;
gzip_comp_level 2;
gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml application/xml+rss;
gzip_vary on;
gzip_proxied expired no-cache no-store private auth;
gzip_disable "MSIE [1-6]\.";
server_tokens off;
access_log off;
upstream backend {
server www.***.com:1102; # Solo 监听端口
}
server {
server_name www.***.com;
listen 1101 ssl http2;
ssl_certificate /etc/nginx/ssl_certs/1_www.***.com_bundle.crt;
ssl_certificate_key /etc/nginx/ssl_certs/2_www.***.com.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5";
ssl_session_cache builtin:1000 shared:SSL:10m;
location / {
proxy_pass http://backend$request_uri;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
client_max_body_size 10m;
}
access_log /etc/nginx/conf.d/www.***.com.log;
}
}