linux – new vhost redirection to another vhost (rspamd)

in fact, install a new vhost apache for a second domain on my debian vps.

Whenever I navigate in the new domain, it is redirected to my rspamd host. My first domain is working well, rspamd redirection works well but not the second tld. Its redirection to https: //mail.domain.tld/rspamd

Here are the 3 vhosts:

mail.domaine.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 on
RewriteRule ^ / rspamd $ / rspamd / [R]

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

SSLEngine on
SSLHonorCipherOrder on
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.domain.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 combined

RewriteEngine on
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.domain.tld
ServerAdmin webmaster@domain.tld
DocumentRoot /var/www/domain.tld/web/

Alias ​​/ phpmyadmin "/ usr / share / phpmyadmin /"
    
        Order allow, refuse
Allow everyone
AuthType Basic
AuthName "Restricted Content"
AuthUserFile /etc/apache2/.htpasswd
Require a valid user
    

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


        #LogLevel info ssl: warn

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

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:

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

        
                AllowOverride All
Order allow, refuse
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 combined


Someone knows what I'm doing wrong?