Criar site com certificado e reescrita https no apache
<VirtualHost *:80>
ServerName winspire.com.br
DocumentRoot /var/www/html/
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]
<Directory "/var/www/html/">
Options FollowSymLinks
AllowOverride All
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName www.winspire.com.br
Redirect Permanent / http://winspire.com.br
</VirtualHost>
<VirtualHost *:443>
ServerAdmin admin@winspire.com.br
ServerName winspire.com.br
SSLEngine on
SSLCertificateKeyFile /etc/httpd/ssl/winspire.com.br.key
SSLCertificateFile /etc/httpd/ssl/winspire.com.br.crt
SSLCertificateChainFile /etc/httpd/ssl/winspire.com.br.chain
SSLProtocol all -SSLv2 -SSLv3
#ErrorLog ${APACHE_LOG_DIR}/error.log
#CustomLog ${APACHE_LOG_DIR}/access.log combined
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel error
DocumentRoot /var/www/html/
<Directory "/var/www/html/">
Options FollowSymLinks
AllowOverride All
</Directory>
</VirtualHost>
ServerName winspire.com.br
DocumentRoot /var/www/html/
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]
<Directory "/var/www/html/">
Options FollowSymLinks
AllowOverride All
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName www.winspire.com.br
Redirect Permanent / http://winspire.com.br
</VirtualHost>
<VirtualHost *:443>
ServerAdmin admin@winspire.com.br
ServerName winspire.com.br
SSLEngine on
SSLCertificateKeyFile /etc/httpd/ssl/winspire.com.br.key
SSLCertificateFile /etc/httpd/ssl/winspire.com.br.crt
SSLCertificateChainFile /etc/httpd/ssl/winspire.com.br.chain
SSLProtocol all -SSLv2 -SSLv3
#ErrorLog ${APACHE_LOG_DIR}/error.log
#CustomLog ${APACHE_LOG_DIR}/access.log combined
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel error
DocumentRoot /var/www/html/
<Directory "/var/www/html/">
Options FollowSymLinks
AllowOverride All
</Directory>
</VirtualHost>
Comentários
Postar um comentário