#Gerar o certificado
1
2
3
4
5
6
7
8
9
10
| #Gerar arquivo site.key
openssl genrsa -out siteb.key 2048
#Gerar arquivo csr
openssl req -new -key siteb.key -out siteb.csr
#Gerar arquivo crt
openssl x509 -req -days 365 -in siteb.csr -signkey siteb.key -out siteb.crt
#Mover os arquvios
mv siteb.crt /etc/ssl/certs/
mv siteb.key /etc/ssl/certs/ |
#Gerar arquivo site.key
openssl genrsa -out siteb.key 2048
#Gerar arquivo csr
openssl req -new -key siteb.key -out siteb.csr
#Gerar arquivo crt
openssl x509 -req -days 365 -in siteb.csr -signkey siteb.key -out siteb.crt
#Mover os arquvios
mv siteb.crt /etc/ssl/certs/
mv siteb.key /etc/ssl/certs/
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
| #Criar arquivo
#vim /etc/apache2/sites-available/siteb.com.br.conf
ProxyVia On
ServerName siteb.dominio.com.br
ServerAlias siteb.dominio.com.br
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / http://srvhttp.site.dominio.com.br/
ProxyPassReverse / http://srvhttp.site.dominio.com.br/
#ProxyPass /includes http://srvhttp.site.dominio.com.br/includes
#ProxyPassReverse /includes http://srvhttp.site.dominio.com.br/includes
Redirect Permanent / http://srvhttp.site.dominio.com.br/
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript application/xml application/xhtml+xml "application/x-javascript \n\n" "text/html \n\n"
DeflateCompressionLevel 9
Order deny,allow
Allow from all
ServerName siteb.dominio.com.br
ServerAlias siteb.dominio.com.br
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / https://srvhttp.site.dominio.com.br/
ProxyPassReverse / https://srvhttp.site.dominio.com.br/
SSLProxyEngine On
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
SSLCertificateFile /etc/ssl/certs/siteb.crt
SSLCertificateKeyFile /etc/ssl/certs/siteb.key
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript application/xml application/xhtml+xml "application/x-javascript \n\n" "text/html \n\n"
DeflateCompressionLevel 9 |
#Criar arquivo
#vim /etc/apache2/sites-available/siteb.com.br.conf
ProxyVia On
ServerName siteb.dominio.com.br
ServerAlias siteb.dominio.com.br
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / http://srvhttp.site.dominio.com.br/
ProxyPassReverse / http://srvhttp.site.dominio.com.br/
#ProxyPass /includes http://srvhttp.site.dominio.com.br/includes
#ProxyPassReverse /includes http://srvhttp.site.dominio.com.br/includes
Redirect Permanent / http://srvhttp.site.dominio.com.br/
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript application/xml application/xhtml+xml "application/x-javascript \n\n" "text/html \n\n"
DeflateCompressionLevel 9
Order deny,allow
Allow from all
ServerName siteb.dominio.com.br
ServerAlias siteb.dominio.com.br
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / https://srvhttp.site.dominio.com.br/
ProxyPassReverse / https://srvhttp.site.dominio.com.br/
SSLProxyEngine On
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
SSLCertificateFile /etc/ssl/certs/siteb.crt
SSLCertificateKeyFile /etc/ssl/certs/siteb.key
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript application/xml application/xhtml+xml "application/x-javascript \n\n" "text/html \n\n"
DeflateCompressionLevel 9