apache шаболн виртуального хоста

Просто пример-шпаргалка как сделать виртуальный хост под httpd

<NameVirtualHost *:80>
<NameVirtualHost *:443>
<VirtualHost *:80>
        ServerName example.com
        ServerAlias www.example.com
        DocumentRoot /var/www/vhosts/example.com
        <Directory /var/www/vhosts/example.com>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
        </Directory>

        CustomLog /var/log/httpd/example.com-access.log combined
        ErrorLog /var/log/httpd/example.com-error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn
</VirtualHost>
<VirtualHost *:443>
        ServerName example.com
        DocumentRoot /var/www/vhosts/example.com
        <Directory /var/www/vhosts/example.com>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
        </Directory>

        CustomLog /var/log/httpd/example.com-ssl-access.log combined
        ErrorLog /var/log/httpd/example.com-ssl-error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        SSLEngine on
        SSLProtocol all -SSLv2 -SSLv3 -TLSv1
        SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!3DES:!MD5:!PSK
  #disable Weak Cipher
        SSLHonorCipherOrder     on
        SSLCertificateFile    /etc/pki/tls/certs/localhost.crt
        SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
        SSLCertificateChainFile /etc/pki/tls/intermediate/file

        <FilesMatch ".(cgi|shtml|phtml|php)$">
                SSLOptions +StdEnvVars
        </FilesMatch>

        BrowserMatch "MSIE [2-6]" 
                nokeepalive ssl-unclean-shutdown 
                downgrade-1.0 force-response-1.0
        BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
</VirtualHost>

Дополнительно: http://www.digicert.com/ssl-support/apache-multiple-ssl-certificates-using-sni.htm

»

Оставить комментарий - Feel free to ask me in English

Он появится после того, как будет одобрен. - All comments are pre-moderated.

Внимание! Пожалуйста, не пишите в комментарии [url=... или [url]... - это будет считаться спамом. Если хотите дать ссылку - пишите просто адрес, до 2х на один коммент.
Attention! Please don't use "[url=..." or "[url]..." in comment's body or it will be deleted as spam
If you want to send me a link just type url, up to 2 urls in one comment.

Спасибо за отзыв! Thank you for a comment!