Commit 28d3cf79 authored by xuchentao's avatar xuchentao

feat: enable production HTTPS and ICP footer

parent 4281dbde
Pipeline #440 failed with stage
in 21 seconds
......@@ -16,7 +16,7 @@ variables:
PM2_BIN: "/usr/bin/pm2"
PM2_HOME_DIR: "/root/.pm2"
PM2_USE_SUDO: "1"
PUBLIC_HOST: "101.126.10.129"
PUBLIC_HOST: "www.inzung.cn"
stages:
- deploy
......@@ -177,7 +177,10 @@ deploy:
sudo -n /usr/bin/install -o root -g root -m 0644 "$CURRENT_DIR/deploy/nginx/yinzhuang.conf" /etc/nginx/conf.d/yinzhuang.conf
sudo -n /usr/sbin/nginx -t
sudo -n /usr/bin/systemctl reload nginx
curl --fail --silent --show-error --max-time 5 --header "Host: $PUBLIC_HOST" http://127.0.0.1/ >/dev/null
curl --fail --silent --show-error --max-time 5 \
--noproxy "*" \
--resolve "$PUBLIC_HOST:443:127.0.0.1" \
"https://$PUBLIC_HOST/" >/dev/null
echo "[deploy] 部署完成:$CURRENT_DIR"
echo "[deploy] 旧 releases 目录未被读取或清理;确认无用后请人工删除"
# 银妆官网 Nginx 配置
# 通过服务器 IP 访问,反向代理到本机 8791 端口。
# 银妆官网正式域名:HTTP 统一跳转到 HTTPS 和 www 主域名。
server {
listen 80;
server_name inzung.cn www.inzung.cn 101.126.10.129;
server_name inzung.cn www.inzung.cn;
return 301 https://www.inzung.cn$request_uri;
}
# 裸域名的 HTTPS 请求统一跳转到 www 主域名。
server {
listen 443 ssl http2;
server_name inzung.cn;
ssl_certificate /etc/nginx/certs/inzung.cn.fullchain.pem;
ssl_certificate_key /etc/nginx/certs/inzung.cn.certkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
return 301 https://www.inzung.cn$request_uri;
}
server {
listen 443 ssl http2;
server_name www.inzung.cn;
ssl_certificate /etc/nginx/certs/inzung.cn.fullchain.pem;
ssl_certificate_key /etc/nginx/certs/inzung.cn.certkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_session_cache shared:INZUNG:10m;
ssl_session_timeout 1d;
ssl_session_tickets off;
# 图片上限为 20MB,JSON 中的 Base64 数据会额外增大请求体。
client_max_body_size 28m;
......
......@@ -13,5 +13,12 @@ import { site } from "../data/site";
<div><h2>银饰系列</h2>{site.products.map((item) => <a href={`/services/#${item.slug}`}>{item.name}</a>)}</div>
<div class="footer-contact"><h2>联系与到店</h2><a class="footer-phone" href="tel:4008113922">{site.contact.phone}</a><address>{site.contact.address}</address><a class="footer-arrow" href="/contact/">查看联系方式 <span>↗</span></a></div>
</div>
<div class="container footer-bottom"><p>© {new Date().getFullYear()} {site.brand.legalName}</p><p>网站展示价格与服务以实际门店沟通为准</p></div>
<div class="container footer-bottom">
<p>
© {new Date().getFullYear()} {site.brand.legalName}
<span aria-hidden="true"> · </span>
<a class="footer-icp" href="https://beian.miit.gov.cn/" target="_blank" rel="noopener noreferrer">湘ICP备2026032239号-1</a>
</p>
<p>网站展示价格与服务以实际门店沟通为准</p>
</div>
</footer>
......@@ -348,6 +348,8 @@ h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 700; lin
.footer-arrow { margin-top: 22px !important; color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 30px; padding: 22px 0; border-top: 1px solid rgba(255,255,255,.1); color: #827871; font-size: 11px; }
.footer-bottom p { margin: 0; }
.footer-icp { transition: color .2s ease; }
.footer-icp:hover { color: var(--gold); }
@media (max-width: 1080px) {
.desktop-nav, .header-cta { display: none; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment