brunoc87
(usa Debian)
Enviado em 14/07/2021 - 06:54h
DNS tá assim:
dominio1 A 192.168.10.50
dominio2 A domínio1
No apache2:
serviço.conf:
<VirtualHost *:80>
ServerName dominion1.com.br
ServerAlias ^ dominion2.com.br
ServerAdmin webmaster@localhost
DocumentRoot /var/www/dominion1.com.br/public/
Redirect permanent /
https://dominion1.com.br
<Directory /var/www/dominion1.com.br/public/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
no default-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerName dominion1.com.br
ServerAlias ^ dominion2.com.br
ServerAdmin webmaster@localhost
DocumentRoot /var/www/dominion1.com.br/public/
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
<Directory "/var/www/dominion1.com.br/public/">
AllowOverride All
</Directory>