Очередной раз
запускал httpd Apache под Debian 7 (wheezy). Оставлю
здесь краткое содержание телодвижений,
в качестве шпаргалки.
su -l
aptitude install apache2-mpm-itk apache2 openssl
a2dissite default
cp /etc/apache2/sites-available/default-ssl /etc/apache2/sites-available/rover-ssl.conf
a2ensite rover-ssl.conf
service apache2 restart
curl -k https://localhost/
openssl s_client -connect 192.168.1.9:443 -state -debug
mkdir -p /etc/ssl/localcerts
openssl req -new -x509 -days 3650 -nodes -out /etc/ssl/localcerts/apache.pem -keyout /etc/ssl/localcerts/apache.key
ls -la /etc/ssl/localcerts/
chmod 600 /etc/ssl/localcerts/apache*
a2enmod ssl
nano /etc/apache2/sites-available/rover-ssl.conf
nano /etc/apache2/ports.conf
netstat -tnlpua|grep apache2
|
nano /etc/apache2/sites-available/rover-ssl.conf
<IfModule mod_ssl.c>
NameVirtualHost *:443
<VirtualHost *:443>
SSLEngine On
SSLCertificateFile /etc/ssl/localcerts/apache.pem
SSLCertificateKeyFile /etc/ssl/localcerts/apache.key
AssignUserId valik root
DocumentRoot /home/valik/www/
<Directory /home/valik/www/>
AuthType Basic
AuthUserFile /home/valik/.htpasswd
AuthName "Alwaysglum restricted services"
Require valid-user
</Directory>
Alias "/torr/" "/mnt/sams640/data/"
<Directory /mnt/sams640/data/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
AuthType Basic
AuthUserFile /home/valik/.htpasswd
AuthName "Alwaysglum restricted services"
Require valid-user
</Directory>
</VirtualHost>
</IfModule>
|
nano /etc/apache2/ports.conf
# NameVirtualHost *:80
# Listen 80
<IfModule mod_ssl.c>
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
|
su -l valik
htpasswd -c ~/.htpasswd guest
htpasswd ~/.htpasswd valik
|
Дополнительно:
original post http://vasnake.blogspot.com/2014/08/apache2-setup-in-debian.html
Комментариев нет:
Отправить комментарий