This file contains hidden or 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
Как настроить SSH на сервере для увеличения времени сессий | |
Для устранения рассоединения при отсутствии активности в шелле необходимо настроить SHH сервис на стороне сервера. | |
Для этого нужно отредактировать файл «/etc/ssh/sshd_config». | |
Имя фала и его раположение одинаково как во FreeBSD, так и в CentOS. | |
Далее нам необходимо отредактировать три параметра: |
This file contains hidden or 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
После установки certbot сертификата, не возможно попасть в админку! | |
Решение: | |
В wp-config.php в самый верх(сразу под <?php) добавить строку: | |
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') $_SERVER['HTTPS']='on'; | |
Затем установить специальный плагин |
This file contains hidden or 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
Laravel и SSL. | |
Запросы HTTPS | |
Настройка фреймворка для работы с сертификатом SSL | |
Laravel может легко и бытро адаптироваться к установке SSL на сайт. | |
Для настройки фреймворка необходимо внести всего одну строку кода в файл |
This file contains hidden or 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
Установка и настройка hostname | |
1. На первом этапе войдите в систему с правами root и убедитесь, что ваша система Debian обновлена до последний версий пакетов установленных программ, а также установлены все исправления безопасности с помощью следующей команды: | |
# apt-get update | |
# apt-get upgrade | |
2. На следующем этапе установите пакеты, которые будут использоваться для администрирования системы: | |
# apt-get install curl net-tools bash-completion wget lsof nano | |
3. Затем откройте файл /etc/host.conf для редактирования в своем любимом текстовом редакторе и добавьте приведенную ниже строку в начале файла, чтобы разрешить DNS сначала читать файл hosts. |
This file contains hidden or 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
Просмотр: | |
Второй параметр количество команд для вывода: | |
history 20 | |
Вывод нужной команды: | |
!234 |
This file contains hidden or 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
#!/bin/bash | |
cd /home/bollabor/public_html | |
wget http://wordpress.org/latest.tar.gz | |
tar -xzvf latest.tar.gz | |
cd wordpress | |
mv * .. | |
cd .. | |
rm latest.tar.gz | |
rm readme.html | |
rm -Rf wordpress |
This file contains hidden or 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
Развертывание на vps Django с Postgres, Nginx, и Gunicorn на Ubuntu 18.04 | |
**************************************************************** | |
1.Создаем пользователя с предоставлением рут прав: | |
adduser awsnrusl | |
usermod -aG sudo awsnrusl | |
проверяем: |
This file contains hidden or 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
Postgresql_командная_строка |
This file contains hidden or 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
Авторизация_по_ключу_для_пользователя | |
mkdir -p /home/awsnrusl/.ssh | |
ssh-keygen -t rsa -b 1024 -f /home/awsnrusl/.ssh/id_rsa | |
cd /home/awsnrusl/.ssh/ | |
конвертируем ключ в формат openssh: | |
# ssh-keygen -i -f id_rsa_pub >> authorized_keys |
This file contains hidden or 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
Deploying Django website to VPS with uWSGI, Nginx and Ubuntu 18.04 | |
1. | |
# creating new user | |
adduser userdir | |
# providing superuser rights | |
usermod -aG sudo userdir |