https of one domain points me to the https of another domain

Alles, was den Apache betrifft, kann hier besprochen werden.

https of one domain points me to the https of another domain

Postby Morales » 27. May 2020 14:59

I have two domains in my vps:

raton-inalambrico and rolsbek.

I have installed a ssl with letsencrypt for each one.

But when I put https:/www.rolsbek.com it redirects me to https:/www.raton-inalambrico.com.es

This doesn't happen with the http because I have two *80 ports for each domain.

The thing is that I don't know how to do it to create a 443 port for each domain or how it goes so that it doesn't redirect me from rolsbek's https to the one of mouse-wireless.

I use to manage ISPConfig

I'm waiting for your help, THANK YOU in advance.

Ports.conf

Code: Select all
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf

Listen 80

<IfModule ssl_module>
Listen 443
</IfModule>

<IfModule mod_gnutls.c>
Listen 443
</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
# NameVirtualHost *:80
# NameVirtualHost *:443



000-default.conf

Code: Select all
<VirtualHost *:80>
        ServerName www.rolsbek.com
      ServerAlias www.www.rolsbek.com
      ServerAdmin webmaster@www.rolsbek.com
        DocumentRoot /var/www/www.rolsbek.com/web
       
        ErrorLog /var/log/ispconfig/httpd/www.rolsbek.com/error.log

      Alias /error/ "/var/www/www.rolsbek.com/web/error/"
      ErrorDocument 400 /error/400.html
      ErrorDocument 401 /error/401.html
      ErrorDocument 403 /error/403.html
      ErrorDocument 404 /error/404.html
      ErrorDocument 405 /error/405.html
      ErrorDocument 500 /error/500.html
      ErrorDocument 502 /error/502.html
      ErrorDocument 503 /error/503.html
       
        Redirect permanent / https://www.rolsbek.com/
    </VirtualHost>
   
    <VirtualHost *:80>
        ServerName www.raton-inalambrico.com.es
      ServerAlias www.raton-inalambrico.com.es
      ServerAdmin webmaster@www.raton-inalambrico.com.es
        DocumentRoot /var/www/www.raton-inalambrico.com.es/web
       
        ErrorLog /var/log/ispconfig/httpd/www.raton-inalambrico.com.es/error.log

      Alias /error/ "/var/www/www.raton-inalambrico.com.es/web/error/"
      ErrorDocument 400 /error/400.html
      ErrorDocument 401 /error/401.html
      ErrorDocument 403 /error/403.html
      ErrorDocument 404 /error/404.html
      ErrorDocument 405 /error/405.html
      ErrorDocument 500 /error/500.html
      ErrorDocument 502 /error/502.html
      ErrorDocument 503 /error/503.html
       
        Redirect permanent / https://www.raton-inalambrico.com.es/
    </VirtualHost>

<VirtualHost *:443>
    ServerName www.rolsbek.com
    DocumentRoot /var/www/www.rolsbek.com/web
    SSLEngine on
    SSLCertificateFile "/etc/letsencrypt/live/www.rolsbek.com/cert.pem"
    SSLCertificateKeyFile "/etc/letsencrypt/live/www.rolsbek.com/privkey.pem"
    SSLCertificateChainFile "/etc/letsencrypt/live/www.rolsbek.com/chain.pem"
</VirtualHost>

<VirtualHost *:443>
    ServerName www.raton-inalambrico.com.es
    DocumentRoot /var/www/www.raton-inalambrico.com.es/web
    SSLEngine on
    SSLCertificateFile "/etc/letsencrypt/live/www.raton-inalambrico.com.es/cert.pem"
    SSLCertificateKeyFile "/etc/letsencrypt/live/www.raton-inalambrico.com.es/privkey.pem"
    SSLCertificateChainFile "/etc/letsencrypt/live/www.raton-inalambrico.com.es/chain.pem"
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet



default-ssl.conf
Code: Select all
 <VirtualHost *:443>
    ServerName www.rolsbek.com
    DocumentRoot /var/www/www.rolsbek.com/web
    SSLEngine on
    SSLCertificateFile "/etc/letsencrypt/live/www.rolsbek.com/cert.pem"
    SSLCertificateKeyFile "/etc/letsencrypt/live/www.rolsbek.com/privkey.pem"
    SSLCertificateChainFile "/etc/letsencrypt/live/www.rolsbek.com/chain.pem"
</VirtualHost>

<VirtualHost *:443>
    ServerName www.raton-inalambrico.com.es
    DocumentRoot /var/www/www.raton-inalambrico.com.es/web
    SSLEngine on
    SSLCertificateFile "/etc/letsencrypt/live/www.raton-inalambrico.com.es/cert.pem"
    SSLCertificateKeyFile "/etc/letsencrypt/live/www.raton-inalambrico.com.es/privkey.pem"
    SSLCertificateChainFile "/etc/letsencrypt/live/www.raton-inalambrico.com.es/chain.pem"
</VirtualHost>
   
</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Morales
 
Posts: 1
Joined: 27. May 2020 14:53
XAMPP version: 64
Operating System: Ubuntu 16.04

Return to Apache

Who is online

Users browsing this forum: No registered users and 20 guests