Website
Table of Contents

Apache

在Apache上配置ghost博客

<VirtualHost *:80>
     ServerName blog.tangzeyuan.com
     ServerAlias blog.tangzeyuan.com
     ServerAdmin i@tangzeyuan.com
     DocumentRoot /var/www/blog.tangzeyuan.com

     ProxyRequests off
     ProxyPass / http://127.0.0.1:2368/
     ProxyPassReverse / http:/127.0.0.1:2368/
</VirtualHost>

ipv6-network

Ghost

重置管理员密码

sqlite> UPDATE users SET password='$2a$10$BQToDNdBtBKCvnrTmMi5m.NK.7i6Qx7YASs.jTkE86I5zqxzE8klC' WHERE email = 'test@test.com';
sqlite> .exit

SSH-without-password

如果你想不输入密码通过SSH远程登陆服务器,一种可行的方式是用SSH keys。

[tang@vbox ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/tang/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/tang/.ssh/id_rsa.
Your public key has been saved in /home/tang/.ssh/id_rsa.pub.
The key fingerprint is:
b8:a8:9f:b5:ed:a4:39:3c:8f:33:3b:63:be:ee:8d:de tang@vbox
[tang@vbox ~]$ ssh wiki@tangzeyuan.com
wiki@tangzeyuan.com's password: 
[tang@vbox ~]$ cat .ssh/id_rsa.pub | ssh wiki@tangzeyuan.com 'cat >> .ssh/authorized_keys'
wiki@tangzeyuan.com's password:
[tang@vbox ~]$ ssh wiki@tangzeyuan.com

Read more: SSH login without password

User-management

给不同的网站分配不同的用户,上传文件时尽量不要用root,以免发生意外。