linux – new redirect vhost to another vhost (rspamd)

Actually, configure a new aphache vhost for a second domain in my vps debian.

Every time I browse the new domain, it is redirected to my rspamd vhost. My first domain works fine, the rspamd redirect works fine but not the second domain. Your redirect to https: //mail.domain.tld/rspamd

Here the 3 vhosts:

mail.domain.tld

    
    
    
    
    Server name mail.domain.tld
RedirectPermanent http: //mail.domain.tld https: //mail.domain.tld/rspamd/





    
    
    
    Server name mail.domain.tld
RedirectPermanent https: //mail.domain.tld https: //mail.domain.tld/rspamd/

###
### Rspamd
###

RewriteEngine in
RewriteRule ^ / rspamd $ / rspamd / [R]

    ProxyPreserveHost On
ProxyPass / rspamd http: // localhost: 11334 /
ProxyPassReverse / rspamd http: // localhost: 11334 /

SSLEngine in
SSLHonorCipherOrder in
SSLCertificateFile /etc/letsencrypt/live/domain.tld-0002/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/domain.tld-0002/privkey.pem

Include /etc/letsencrypt/options-ssl-apache.conf


domain.tld



        

        

        

        ServerName domain.tld
ServerAlias ​​www.dominio.tld
ServerAdmin webmaster@domain.tld
DocumentRoot /var/www/domain.tld/web/

#LogLevel info ssl: warn

ErrorLog $ {APACHE_LOG_DIR} /error.log
CustomLog $ {APACHE_LOG_DIR} /access.log combo

RewriteEngine in
RewriteCond% {SERVER_NAME} = www.domain.tld [OR]
RewriteCond% {SERVER_NAME} = domain.tld
RewriteRule ^ https: //% {SERVER_NAME}% {REQUEST_URI} [END,NE,R=permanent]





        

        

        

        ServerName domain.tld
ServerAlias ​​www.dominio.tld
ServerAdmin webmaster@domain.tld
DocumentRoot /var/www/domain.tld/web/

Alias ​​/ phpmyadmin "/ usr / share / phpmyadmin /"
    
        Order allow, deny
Allow everyone
AuthType Basic
Author name "Restricted content"
AuthUserFile /etc/apache2/.htpasswd
Require valid user
    

        
                
                
                
                AllowOverride All
Order allow, deny
Allow everyone
Require all granted
Options -Indexes
        


        #LogLevel info ssl: warn

ErrorLog $ {APACHE_LOG_DIR} /error.log
CustomLog $ {APACHE_LOG_DIR} /access.log combo

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/domain.tld-0002/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/domain.tld-0002/privkey.pem

RewriteEngine On
RewriteCond% {HTTP_HOST}! ^ Www . [NC]
RewriteRule ^ (. *) $ Http: //www.% {HTTP_HOST}% {REQUEST_URI} [R=301,L]



domain2.tld:

                                DomainName domain2.tld
ServerAlias ​​www.domain2.tld
ServerAdmin webmaster@domain.tld
DocumentRoot /var/www/domain2.tld/web/

        
                AllowOverride All
Order allow, deny
Allow everyone
Require all granted
Options -Indexes
        


    RewriteEngine On
RewriteCond% {HTTP_HOST}! ^ Www . [NC]
    RewriteRule ^ (. *) $ Http: //www.% {HTTP_HOST}% {REQUEST_URI} [R=301,L]


        #LogLevel info ssl: warn

ErrorLog $ {APACHE_LOG_DIR} /error.log
CustomLog $ {APACHE_LOG_DIR} /access.log combo


Does anyone know what I'm doing wrong?