LAMP Centos 7 на AWS Lightsail

# yum install update Timezone Centos 7 # yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm # yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm # yum -y install yum-utils # yum-config-manager –enable remi-php72 # yum update # yum install wget zip unzip # yum install httpd MariaDB # yum install mariadb-server mariadb # mysql_secure_installation And answer to questions in wizard: Switch to …

Continue reading ‘LAMP Centos 7 на AWS Lightsail’ »

Apache: включаем OCSP и HSTS

OCSP Включается глобально – нужно раскоментировать строки: # ee /usr/local/etc/apache24/extra/httpd-ssl.conf # Enable stapling for all SSL-enabled servers: SSLUseStapling On SSLStaplingCache “shmcb:/var/run/ssl_stapling(32768)” SSLStaplingStandardCacheTimeout 3600 или для каждого виртуального хоста индивидуально в файле ./extra/httpd-vhosts.conf или в файлах ./Includes/: <VirtualHost _default_:443> # General setup for the virtual host DocumentRoot “/usr/local/www/apache24/data” ServerName mail.domen.ua:443 ServerAdmin postmaster@domen.ua ErrorLog “/var/log/httpd-error.log” TransferLog “/var/log/httpd-access.log” …

Continue reading ‘Apache: включаем OCSP и HSTS’ »

Apache24 + SSL и redirect http to https

1. Создание сертификата Создаем папку для сертификатов и переходим в нее: pwd /usr/local/etc/apache24 mkdir ssl ; cd ssl генерируем сертификат: openssl req -new -x509 -days 1461 -nodes -out cert.pem -keyout cert.key * в данном примере созданы открытый и закрытый ключи на 4 года (1461 день). 2. Установка модуля SSL для Apache # apachectl -M | …

Continue reading ‘Apache24 + SSL и redirect http to https’ »

Бесплатный SSL-сертификат от Letsencrypt для Apache

При попытке установить сертификат, выяснилось, что клиент py27-letsencypt заменён на py27-certbot и теперь обновление сертификатов letsencrypt делаем так. Проект letsencrypt, даёт возможность свободно получить SSL/TLS сертификаты. Цель сделать шифрованное соединение максимально доступным. Проект развивается. На FreeBSD cтавится клиент letsencrypt, ему нужны 80 и 443 порты. Через него запрашиваются и скачиваются сертификаты для указанных доменов. Пока сертификаты …

Continue reading ‘Бесплатный SSL-сертификат от Letsencrypt для Apache’ »

Apache24+php56+MySQL56+phpmyadmin

Устанавливаем Apache 2.4 из портов cd /usr/ports/www/apache24 make all install clean В файл /etc/rc.conf добавляем строчку apache24_enable=»YES» В файле /usr/local/etc/apache24/httpd.conf  раскомментируем строчку ServerName ServerName www.localserver12.ru:80 Находим строчку DirectoryIndex и допишем в неё: DirectoryIndex index.html index.htm index.php index.shtml Теперь запускаем службу Apache: service apache24 start Если запуск не выдал никакой ошибки, переходим к следующему шагу. Устанавливаем …

Continue reading ‘Apache24+php56+MySQL56+phpmyadmin’ »