同步笔记本

date
Apr 28, 2022
slug
newservice-note-synchronized
status
Published
summary
新服务
tags
service
type
Post
URL
notion image

Summary

步骤

宝塔先建立 note.xxx.xxx

下载代码

SERVICE_DOMAIN=‘note.xxx.xxx’

cd /www/wwwroot
mv $SERVICE_DOMAIN $SERVICE_DOMAIN.backup

git clone https://github.com/pereorga/minimalist-web-notepad $SERVICE_DOMAIN

# 若要保留 .user.ini 和 .htaccess 就cp 过来
chown -R www:www $SERVICE_DOMAIN && chmod 766 $SERVICE_DOMAIN

修改

  • base_url
notion image
notion image
  • nginx
location / {
    rewrite ^/([a-zA-Z0-9_-]+)$ /index.php?note=$1;
}
notion image
notion image
  • 开启SSL

验证

notion image

© Ying Bun 2021 - 2022