This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Меняем пароль для пользователя root, вводим 2 раза один и тот же пароль | |
sudo passwd root | |
#Получаем права, вводим пароль, который прописали выше | |
su | |
**************** Обновление Ubuntu ************** | |
/*не обязательно, но желательно*/ | |
sudo apt-get update | |
sudo apt-get upgrade | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
********** Установка Vesta CP ********** | |
#Корневая директория | |
cd | |
# Загружаем скрипт | |
wget http://vestacp.com/pub/vst-install.sh | |
# Запускаем скрипт | |
bash vst-install.sh --force | |
/*вводим y, вводим email, вводим, если имеется домен (пример sait.ru), ждем мин. 15*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
В документах панели указано следующее: | |
RewriteEngine On | |
RewriteCond %{HTTPS} off | |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L] | |
Но существуют и другие варианты: | |
Вариант 1 * | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{SERVER_PORT} !^443$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# редактируем конфиг | |
sudo nano /etc/ssh/sshd_config | |
Находим строку PermitRootLogin (сохраняем слова в этой строке для безопасности) | |
Меняем все что написано в строке на PermitRootLogin yes | |
После всех манипуляций советую вернуть старое значение | |
# перезагрузка | |
sudo service ssh restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Редактируем файл командой: | |
nano /usr/local/vesta/conf/ftp.backup.conf | |
Добавляем в файл: | |
HOST='ip дополнительного севера' | |
PORT='21' | |
USERNAME='Ваш логин от ftp' | |
PASSWORD='Ваш пароль от ftp' | |
BPATH='/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## redirect с http на https | |
add_action('init', 'http_to_https_redirect'); | |
function http_to_https_redirect(){ | |
if( is_ssl() ) return; | |
if ( 0 === strpos($_SERVER['REQUEST_URI'], 'http') ) | |
wp_redirect( set_url_scheme( $_SERVER['REQUEST_URI'], 'https' ), 301 ); | |
else | |
wp_redirect( 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 301 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1)Идем в админку VestaCP в раздел WEB, редактируем основной домен(например domain.ru) | |
и добавляем алиас вида: panel.domain.ru (вместо panel укажите путь, по которому при | |
заходе Вы будете видеть VestaCP) | |
2)Заходим в раздел DNS и проверяем записи этого же домена. Обязательно должна быть A | |
запись с именем, которое Вы вводили до этого! | |
3)Идем по пути /etc/nginx/conf.d/ - там будет файл вида 127.0.0.1.conf (только там ip | |
вашего сервера) - очищаем содержимое этого файла и сохраняем. | |
4)Далее идем по пути /usr/local/vesta/nginx/conf/ - там будет файл nginx.conf - | |
открываем и редактируем: | |
После # Vhost будет стоять блок виртуального хоста, примерно такой: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>Demystifying Email Design</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> | |
</head> | |
<body style="margin: 0; padding: 0;"> | |
<table border="0" cellpadding="0" cellspacing="0" width="100%"> | |
<tr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>Demystifying Email Design</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> | |
</head> | |
<body style="margin: 0; padding: 0;"> | |
<table border="0" cellpadding="0" cellspacing="0" width="100%"> | |
<tr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to install WHMCS module | |
1. Locate whmcs installation directory on your server | |
2. Create vesta directory in the modules/server subdirectory | |
3. Download php module | |
Example: | |
cd /home/user/web/billing-site.ltd/public_html/modules/server | |
mkdir vesta | |
wget http://c.vestacp.com/0.9.8/rhel/whmcs-module.php -O vesta.php |
OlderNewer