一 桐腌、docker?內(nèi)nginx?監(jiān)聽地址
?1、?ports: ?
? ? ? - "8080:80"?
? ? ? - "443:443"
2裁蚁、docker? 內(nèi)nginx?配置
server {
? ? listen ? ? ? 80;
? ? server_name ?admin.yuming.cn;
? ? rewrite ^(.*)$ https://$host$1 permanent;
}
server {
? ? #listen ? ? 80 ?;
? ? ?listen 443 ssl;
? ? ssl on;
? ? ssl_certificate /etc/letsencrypt/live/admin.shuomeiguo.cn/fullchain.pem;
? ? ssl_certificate_key /etc/letsencrypt/live/admin.shuomeiguo.cn/privkey.pem;
? ? ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
? ? server_name admin.shuomeiguo.cn;
? ? root ?/www/web/fecshop/appadmin/web;
? ? server_tokens off;
? ? include none.conf;
? ? index index.php index.html index.htm;
? ? access_log /www/web_logs/access.log wwwlogs;
? ? error_log ?/www/web_logs/error.log ?notice;
? ? location ~ \.php$ {
? ? ? ? fastcgi_pass ? php:9000;
? ? ? ? fastcgi_index ?index.php;
? ? ? ? include fcgi.conf;
? ? }
? ? location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
? ? ? ? expires ? ? ?30d;
? ? }
? ? location ~ .*\.(js|css)?$ {
? ? ? ? expires ? ? ?12h;
? ? }
}
二 矢渊、主機(jī)安裝的nginx?內(nèi)加? ?使用ifconfig?找到docker0?監(jiān)聽域名
server {
? ? listen 80;
? ? server_name *.shuomeiguo.cn; ? ?
? ? # 把域名替換成你自己的
? ? location / {
? ? proxy_redirect off; ?
? ? ? ? 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_pass http://172.17.0.1:8080; ? ? ?# 這里ip地址設(shè)置成你的宿主主機(jī)ip+端口(或許可以localhost:端口,我沒(méi)試)
? ? ? }
}
重啟nginx? 既可以成功
Lemocms 后臺(tái)管理系統(tǒng) 基于tp6(thinkphp) easywechat4.* layui 開發(fā)的后臺(tái)管理系統(tǒng) 集成微信管理功能 五星推薦
Lemocms 本系統(tǒng)長(zhǎng)期更新,歡迎star和提出和反饋問(wèn)題 QQ群 455018252
后臺(tái)示例地址?http://demo.lemocms.com/index.php/admin? 加群獲取賬號(hào)
在使用中有任何問(wèn)題枉证,歡迎反饋給我矮男,可以用以下聯(lián)系方式跟我交流
QQ群:455018252
gitee:https://gitee.com/limingyue0312/lemocms