`getnote.top` 轻量的云笔记本 - 类notepad.cc网站的搭建

Author Avatar
Lussac 2018年02月25日 ; Views: 5595
  • 在其它设备中阅读本文章

getnote.top 轻量的云笔记本 - 类 notepad.cc 网站的搭建

notepad.cc 是一个简洁好用的文本分享网站,特别适用于跨设备快速传输一些文本内容。但 notepad.cc 早已关闭,而且与之相似的 notepad.live 近期似乎也无法访问了。于是我在 GitHub 上找到的 类似的开源项目 ,部署到了服务器上并绑定了域名 getnote.top

如果你想使用 getnote.top ,请先查看 说明

开源项目地址:Minimalist Web Notepad - GitHub

原 "getnote.cf" 已将域名将变更为 "getnote.top" ,请各位用户使用新域名访问此网站,并修改已保存的浏览器书签,或相关记录。*


安装步骤

安装步骤其实相当简单,只要服务器已经搭建了 PHP 运行环境即可(此项目无需数据库)。

  1. 将源码解压至网站根目录
  2. 修改 index.php 文件里的 $base_url ,确保 _tmp 文件夹的写入权限
    如何修改写入权限:使用 chown 命令修改文件夹权限;或直接将 _tmp 文件夹改为 "777" 权限。
  3. 配置好 Apache 或 Nginx 的 url rewrite

官方说明文档 中的安装步骤如下:

Installation

At the top of index.php file, change $base_url variable to point to your site.

Make sure the web server is allowed to write to the _tmp directory.

On Apache

You may need to enable mod_rewrite and set up .htaccess files in your site configuration.
See How To Set Up mod_rewrite for Apache.

On Nginx

To enable URL rewriting, put something like this in your configuration file:

If notepad is in the root directory:

location / {
        rewrite ^/([a-zA-Z0-9]+)$ /index.php?f=$1;
}

If notepad is in a subdirectory:

location ~* ^/notes/(\w+)$ {
        try_files $uri /notes/index.php?f=$1;
}

更多事项

  1. 目前此项目的功能相当简单,未来我可能会作更多改进或增加不同功能
  2. getnote.cf 属于 .cf 免费域名,暂不保证此域名能够长久使用,本文只是分享该网站的搭建过程
  3. 若此域名过期,我将更新本文并在文中告知
  4. 于 2022 年 11 月 11 日,网站域名已正式更换为付费域名 getnote.top

参考资料

    lyviecs
    lyviecs  2023-04-21, 18:06

    感谢博主的分享,从.cf开始就有在用了!
    最近试着瞎折腾,用docker自己搭了一个,
    但是字符串后面会默认生成#<password>,
    不知要怎么解决@_@

    浮光
    浮光  2021-02-03, 10:06

    感谢博主的思路!我之前也做过类似的应用,不过不够博主的简洁。

    由于我服务器上没有安装PHP环境,所以使用Python+Flask复刻了一个版本,代码已公开到github,再次感谢博主

    https://github.com/chancelyg/SyncMemo

      Lussac
      Lussac  2021-02-03, 10:18

      感谢你的分享。其实我只是部署了别人的开源项目而已,一开始也是为了自己方便。其实类似的网站还有很多,功能也各有特色,如:支持Markdown格式、阅后即焚、只读分享、设置访问密码、自定义保存时间(多少天后删除)、等等等等。