如何修复目录/文件属性?
Virtualmin -> Limits and Validation -> Validate Virtual Servers -> Fix Permissions ,可以修复一些用 root 命令操作时生产的文件归属问题,此操作默认把目录下的文件按虚拟主机的用户组/用户分配。
如何设置IP访问时的网站?
假设VPS上有A,B两个网站,那么访问IP时如何控制显示哪个网站呢?在 Virtualmin 里,从左边的菜单选择你要作为IP访问时的网站例如 A.COM,接着 Server Configuration -> Website Options ,选中右边的 Default website for IP address? 选项即可。
如何安装 Memcached 服务?
通过SSH命令安装 memcached : yum install memcached -y , 然后在 Webmin -> System -> Bootup and Shutdown 里,搜索到memcached,加入自动启动。
为php加入memcached扩展,以CentOS为例,在SSH执行 yum install rh-php70-php-memcached 。
如何把网站定期备份到另外一台装有 Webmin + Virtualmin 的服务器上?
- Virtualmin -> Backup and Storage -> Scheduled Backups -> Add a new backup schedule ,右边的 Virtual servers 和 Features and settings 可以保持默认的(默认保存所有虚拟主机和数据库/证书/logs等)。
- 下面的 Destination and format 里,Backup destinations 选 SSH server ,把另外一台装有 Webmin + Virtualmin 的服务器的信息填上,其中 File on server 是目标服务器上的备份存放路径,例如 /root/backups/%m%d (%m%d是按照“月份日期”格式建立目录进行备份)。
- Delete old backups 里选 Yes, after 5 days (只保留最近5天的备份,按需更改)。
- Additional destination options 中的 Do strftime-style time substitutions on file or directory name 一定要打勾,否则上面按照日期建立多个备份的目录就创建不了,从而导致备份失败。
- Backup format 里的 Create destination directory? 也要选上。
- Schedule and reporting 里,可以输入提醒邮箱,备份完成后会有邮件通知,Scheduled backup time 里选 Simeple schedule - Daily(at midnight) 就能每天自动备份了。
其他文章
- Virtualmin Memory Usage (and Other Tales of Wonder and Woe!) 介绍了Virtualmin.com的服务器和内存用量
- Virtualmin on Low Memory Systems 介绍了如何减少Virtualmin的内存使用量
- Using Nginx with Virtualmin 用Nginx替换Apache
- Configuring Virtualmin on CentOS 7 for Website Hosting: Part 1 – Low End Box
- Configuring Virtualmin on CentOS 7 for Website Hosting: Part 2 – Low End Box