[轉]vestacp
https://hzsh.xyz/679/vestacp%E5%AE%89%E8%A3%9D-%E5%85%8D%E8%B2%BBvps%E6%8E%A7%E5%88%B6%E9%9D%A2%E6%9D%BF%E9%85%8D%E7%BD%AE%E6%95%99%E5%AD%B8
[轉][ TUTORIAL ] How to change the default /phpmyadmin alias url
https://forum.vestacp.com/viewtopic.php?f=10&t=5264
[轉]The Perfect Server - Debian 8 Jessie (Apache2, BIND, Dovecot, ISPConfig 3)
https://www.howtoforge.com/tutorial/perfect-server-debian-8-jessie-apache-bind-dovecot-ispconfig-3/
https://www.howtoforge.com/tutorial/perfect-server-debian-8-jessie-apache-bind-dovecot-ispconfig-3/2/
https://www.howtoforge.com/tutorial/perfect-server-debian-8-jessie-apache-bind-dovecot-ispconfig-3/3/
===
Backup entire ispconfig 3 and restore
https://www.howtoforge.com/community/threads/ispconfig-3-move-to-another-server.41643/#post-295412
https://www.howtoforge.com/community/threads/what-to-backup-ispconfig-and-need-to-know-how.41595/
https://www.howtoforge.com/tutorial/perfect-server-debian-8-jessie-apache-bind-dovecot-ispconfig-3/2/
https://www.howtoforge.com/tutorial/perfect-server-debian-8-jessie-apache-bind-dovecot-ispconfig-3/3/
===
Backup entire ispconfig 3 and restore
https://www.howtoforge.com/community/threads/ispconfig-3-move-to-another-server.41643/#post-295412
https://www.howtoforge.com/community/threads/what-to-backup-ispconfig-and-need-to-know-how.41595/
[轉]2016’s Ultimate Guide to Web Panels: cPanel vs. Plesk vs. Webmin vs. Others
http://www.hostingadvice.com/blog/cpanel-vs-plesk-vs-webpanel/
https://github.com/qooob/authentic-theme
=====
https://www.howtoforge.com/tutorial/ubuntu-perfect-server-with-apache-php-myqsl-pureftpd-bind-postfix-doveot-and-ispconfig/
https://github.com/qooob/authentic-theme
=====
https://www.howtoforge.com/tutorial/ubuntu-perfect-server-with-apache-php-myqsl-pureftpd-bind-postfix-doveot-and-ispconfig/
PageSpeed Module vestacp
https://forum.vestacp.com/viewtopic.php?f=11&t=9790
Google PageSpeed Module
Why Google PageSpeed Module
http://www.phpxs.com/post/2501
https://moz.com/ugc/use-googles-pagespeed-module-to-dramatically-increase-the-speed-of-your-website
https://developers.google.com/speed/pagespeed/module/configuration
https://developers.google.com/speed/pagespeed/module/download
=====
Compiling Third-Party Modules Into Nginx
https://serversforhackers.com/compiling-third-party-modules-into-nginx
=====
Apache mod-pagespeed-stable_current_amd64.deb
http://www.matrudev.com/post/download-install-mod_pagespeed-linux-server/
https://www.howtoforge.com/tutorial/ubuntu-apache-mod_pagespeed/
=====
Compiling Third-Party Modules Into Nginx
https://serversforhackers.com/compiling-third-party-modules-into-nginx
=====
Apache mod-pagespeed-stable_current_amd64.deb
http://www.matrudev.com/post/download-install-mod_pagespeed-linux-server/
https://www.howtoforge.com/tutorial/ubuntu-apache-mod_pagespeed/
Let’s Encrypt ubuntu 14.04 vmware 2
Using Let’s Encrypt (beta) with Vesta Control Panel
other way:
Super Important now open not need to do
https://docs.google.com/forms/d/15Ucm4A20y2rf9gySCTXD6yoLG6Tba7AwYgglV7CKHmM/viewform?edit_requested=true
Super Important2
open pem file, copy inside data put in vestacp..............no put path/file
SO Wait for Let’s Encrypt OPEN~~~
=====renew=====
./letsencrypt-auto renew
1、If /etc/letsencrypt/archive/<domain>/ have new file:cert2.pem 、 chain2.pem、fullchain2.pem 、privkey2.pem then
check /etc/letsencrypt/live/<domain>/ If link is new file, the mean
2、put new file:cert2.pem 、 chain2.pem、fullchain2.pem 、privkey2.pem to vestacp SSL Support again
SSL Certificate = cert2.pem
SSL Key = privkey2.pem
SSL Certificate Authority / Intermediate (optional) = chain2.pem
3、restart apache and nginx then ok~~~
https://docs.google.com/document/d/1y5tTtImTGk_zqYe3lelGtMl8_gSCQcNgCCdbYTQAb7E/edit#heading=h.fc0utsgks117
./letsencrypt-auto certonly -a webroot --renew-by-default --agree-dev-preview --server https://acme-v01.api.letsencrypt.org/directory --webroot-path /home/admin/web/<domain>/public_html -d <domain>
other way:
./letsencrypt-auto --server https://acme-v01.api.letsencrypt.org/directory \
--renew-by-default \
-a webroot --webroot-path [PATH_TO_APP_WEBROOT] --email [EMAIL] --text \
--agree-tos --agree-dev-preview -d [DOMAIN_NAME] auth
https://docs.google.com/forms/d/15Ucm4A20y2rf9gySCTXD6yoLG6Tba7AwYgglV7CKHmM/viewform?edit_requested=true
Super Important2
open pem file, copy inside data put in vestacp..............no put path/file
SO Wait for Let’s Encrypt OPEN~~~
=====renew=====
./letsencrypt-auto renew
1、If /etc/letsencrypt/archive/<domain>/ have new file:cert2.pem 、 chain2.pem、fullchain2.pem 、privkey2.pem then
check /etc/letsencrypt/live/<domain>/ If link is new file, the mean
ln -s /etc/letsencrypt/live/<domain>/fullchain.pem /home/admin/conf/web/ssl.<domain>.pemthis no use.
ln -s /etc/letsencrypt/live/<domain>/privkey.pem /home/admin/conf/web/ssl.<domain>.key
ln -s /etc/letsencrypt/live/<domain>/cert.pem /home/admin/conf/web/ssl.<domain>.crt
ln -s /etc/letsencrypt/live/<domain>/chain.pem /home/admin/conf/web/ssl.<domain>.ca
2、put new file:cert2.pem 、 chain2.pem、fullchain2.pem 、privkey2.pem to vestacp SSL Support again
SSL Certificate = cert2.pem
SSL Key = privkey2.pem
SSL Certificate Authority / Intermediate (optional) = chain2.pem
3、restart apache and nginx then ok~~~
vestacp install
1、https://vestacp.com/#install
2、login change admin password
3、restore backup
restore backup Fails
Super Important
A
Old vmware or server setting:~admin/conf/web/*.conf must keep or backup. Beacuse vestacp backup & resstore have big promble at here.
Example: I have nginx.xxxxx.conf use include other nginx.ooooo.conf . When resotre conf, vestacp make error, put all conf together one file.
So Best Way is backup old server conf/web/* , restore conf/web/ then
nginx -t for test check conf, If ok, nginx is work ok.
So this step must remeber~~~~~~
B
named bind9 load file permission denied
HOW to check
SO NOW EDIT
Search google, some article chmod、chgrp、chown /home/admin/con/dns/* is not use for me.
2、login change admin password
3、restore backup
restore backup Fails
Super Important
A
Old vmware or server setting:~admin/conf/web/*.conf must keep or backup. Beacuse vestacp backup & resstore have big promble at here.
Example: I have nginx.xxxxx.conf use include other nginx.ooooo.conf . When resotre conf, vestacp make error, put all conf together one file.
So Best Way is backup old server conf/web/* , restore conf/web/ then
nginx -t for test check conf, If ok, nginx is work ok.
So this step must remeber~~~~~~
B
named bind9 load file permission denied
HOW to check
tail -f /var/log/syslogthen
sudo service bind9 restartthen can see log. IF see named load file have permission denied, the mean log /home/admin/conf/dns conf faild!
SO NOW EDIT
sudo nano /etc/apparmor.d/usr.sbin.namedput
/home/admin/conf/dns/** rw,
/home/admin/conf/dns/ rw,
then
sudo service apparmor reload
then
sudo service bind9 restartthen check syslog agin.
tail -f /var/log/syslogIF Not see permission denied, It's mean SUCCESS!
Search google, some article chmod、chgrp、chown /home/admin/con/dns/* is not use for me.
vestacp Restore Fails
nginx restart error
nginx: [emerg] unexpected end of file, expecting ";" or "}" in
he problem is in /etc/nginx/conf.d/vesta.conf
There is probably a apache.conf line and you need to remove it and problem solved.
https://forum.vestacp.com/viewtopic.php?t=5352
https://forum.vestacp.com/viewtopic.php?t=6213
=====
Error: Database connection to localhost failed
service mysql stop && service mysql start && dpkg-reconfigure mysql-server-5.5
=====
phpmyadmin can't login
nano /usr/local/vesta/conf/mysql.conf see root passwd
http://ljasonh.com/find-and-change-vestacp-mysql-root-password/
nginx: [emerg] unexpected end of file, expecting ";" or "}" in
he problem is in /etc/nginx/conf.d/vesta.conf
There is probably a apache.conf line and you need to remove it and problem solved.
https://forum.vestacp.com/viewtopic.php?t=5352
https://forum.vestacp.com/viewtopic.php?t=6213
=====
Error: Database connection to localhost failed
>> the mean: reset root passwd
https://forum.vestacp.com/viewtopic.php?t=5195
=====
phpmyadmin can't login
nano /usr/local/vesta/conf/mysql.conf see root passwd
http://ljasonh.com/find-and-change-vestacp-mysql-root-password/
vestacp restore backup
v-restore-user admin admin.2015-11-08.tar
you should run this command under root
or (under sudo user)
/usr/local/vesta/bin/v-restore-user
Error: backup doesn't exist
mkdir /home/backup
chown admin backup
chgrp admin backup
ln -s /home/backup /
move admin admin.2015-11-08.tar to directory backup
IF still can not, put admin.2015-11-08.tar in backup
IF no /home/backup mkdir and chown chgrp, but check /etc/passwd have account
[轉]LINUX VPS VESTACP
http://zhaozhao.info/archives/150416
Apache模版有default、basedir、hosting、phpcgi、phpfcgid和wsgi。default模版没有额外的设置,适合自用的朋友。basedir模版直译是反对使用openbasedir指令的PHP脚本,我理解是防止PHP脚本试图绕过openbasedir指令限制。hosting模版适用于虚拟主机,各个网站会相对独立,可能更适合要外包的同学。phpcgi模版则是使用CGI方式运行PHP,个人认为没什么意思。phpfcgid模版则使用FastCGI方式运行PHP。wsgi模版则是为了运行python脚本。
Nginx模版有default、hosting、сaching和force-https。default模版提供静态服务。hosting模版禁用了symlink,适用于虚拟主机,更安全。сaching模版适用于追求高性能的朋友,Nginx将发挥其强大的缓存功能,而Apache和php真正成了后台。force-https模版则是访问HTTP会跳转到HTTPS。
DNS模版有default、gmail、child-ns。gmail模版适用于使用Google App邮件托管。child-ns模版比default模版多了ns1和ns2的A记录,大家差不多就明白是什么意思了吧。
模版在/usr/local/vesta/data/templates/目录下,可以很方便地自定义模版,可以先参考官方怎么写的。个人自用我推荐default+default,虚拟主机外包我推荐hosting+hosting或者phpfcgid+hosting。
另外一点,就是软件包中有一项SSH访问,其中有sh、bash、nologin、tcsh、csh与rssh。nologin就是禁止SSH访问,sh、bash、tcsh与csh都是shell,具体区别就不谈了。rssh特别重要,rssh是指restricted secure shell,受限制的Shell,只能使用sftp与scp(一个基于SFTP的文件拷贝命令)。FTP其实是一种很不安全的传输协议,全明文,连密码也是明文。SFTP则是一个很棒的东西。因此使用VestaCP开虚拟主机推荐使用rssh,当然直接给用户bash就更好了。
所以之后我习惯在新主机安装好基本环境后,先丢 PHP 探针到主机上做一下浮点运算能力检测,检测出的数值要在0.8以下才会快速的开启网页(之前在 Linode 测出来的是2点多,在白天时还会更慢,你说扯不扯!?)。
如果你很在乎网站的效能的话,那么应该知道要利用 cache 的方式让网站提升速度,而在 Vesta 里很容易的就可以设定好 Varnish cache(https://www.varnish-cache.org/),只要进入 WEB 里,在 Nginx Template 的下拉选单指定 caching 就完成了。
网站的安全防护也是很重要的部份,如果是租一般的分享空间的话,基本上主机商都已经做好防火墙之类的设定了。但我租的是 VPS,所以向主机商租到的只有硬件、传输量、DNS 跟支持服务而已,需要防卫的话就要自己处理,建议可以安装 CSF 防火墙来保护主机的安全。
用 SSH 与主机联机安装 CSF:
wget http://www.configserver.com/free/csf.tgz
tar xzvf csf.tgz
安装
ufw disable
进到 CSF 文件夹
cd csf
执行安装脚本
sh install.sh
安装完成后再测试一下 iptables 模块看有没有问题
perl /usr/local/csf/bin/csftest.pl
接着编辑需要要开放的 Port
nano /etc/csf/csf.conf
因为 Vesta 的后台是走 Port 8083,所以也要开启这个阜号才能进入后台
# Allow incoming TCP ports
TCP_IN = "20,21,22,25,53,80,110,143,443,465,587,993,995,8083"
# Allow outgoing TCP ports
TCP_OUT = "20,21,22,25,53,80,110,113,443,8083"
若是还需要其它的设定,可以参考这篇教学:https://www.digitalocean.com/community/articles/how-to-install-and-configure-config-server-firewall-csf-on-ubuntu
http://configserver.com/cp/csf.html
訂閱:
文章 (Atom)