选择一个有代表性的域名,比如:minminmsn.com
参考:https://buy.cloud.tencent.com/domain?from=console
个人站点备案,借助平台还是很方便的,大概20工作日左右可完成(根据大陆法所有域名需要备案,否则后果自负)
参考:https://console.cloud.tencent.com/beian
个人站点非交互页面比较好备案,需要ICP备案后30日启动
参考:https://cloud.tencent.com/document/product/243/19142
竟然有域名型免费版可以免费试用一年(窃喜)
https://buy.cloud.tencent.com/ssl
|
|
|
wget http://nginx.org/download/nginx-1.14.1.tar.gz
tar zxvf nginx-1.14.1.tar.gz
cd nginx-1.14.1/
./configure --with-http_ssl_module
make
make install
user nobody;
worker_processes auto;
error_log logs/error.log;
pid logs/nginx.pid;
#偶尔调大点就行,个人博客访问量大绝对有问题
events {
worker_connections 10240;
}
http {
include mime.types;
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"';
access_log logs/access.log main;
sendfile on;
tcp_nopush on;
keepalive_timeout 65;
#开启压缩节省服务器流量
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_comp_level 2;
gzip_types text/htm application/x-javascript text/css image/jpeg image/png;
gzip_vary off;
#配置限流放置轻微恶搞
limit_req_status 418;
limit_conn_status 418;
limit_req_zone $binary_remote_addr zone=one:10m rate=3r/s;
limit_conn_zone $binary_remote_addr zone=addr:10m;
server {
listen 80;
server_name minminmsn.com m.minminmsn.com www.minminmsn.com;
return 301 https://wwww.minminmsn.com$request_uri;
}
#注意填上申请的证书及加密算法的安全性
server {
listen 443 ssl;
server_name www.minminmsn.com;
limit_req zone=one burst=5 nodelay;
limit_conn addr 5;
ssl_certificate ssl/minminmsn.crt;
ssl_certificate_key ssl/minminmsn.key;
ssl_prefer_server_ciphers on;
ssl_ciphers "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
ssl_protocols TLSv1.3 TLSv1.2 TLSv1.1 TLSv1;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 60m;
#wordpress默认不支持ssl,nginx反向代理配置后还需要安装插件ssl-insecure-content-fixer才行
location / {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
client_max_body_size 30M;
client_body_buffer_size 256k;
proxy_connect_timeout 60s;
proxy_read_timeout 600s;
proxy_send_timeout 600s;
}
}
}
docker可以当做一个可以开启暂停重启关闭的程序,只要数据保存到外部不丢失,使用起来非常方便快捷
docker pull mysql:5.7
docker pull wordpress:latest
docker run --name mysql -v /yourpath/db:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=your@password --restart=always -d mysql:5.7
docker run --name wordpress -v /yourpath/www:/var/www/html --restart=always --link mysql:mysql -p 8080:80 -d wordpress
(选择能Hold住且清新脱俗的) Chilly是一个响应式,多功能的WordPress主题。灵活的它,适合显示机构、博客、商业、公司或作品集。定制是容易和直接的,提供的选项能让您设置您的站点,以完全符合您所期望的在线存在。请访问此链接https://wordpress.org/themes/spicepress/。