[Closed] Redirect from http to https doesn't work

Discussion in 'General' started by mauropixel, Oct 29, 2021.

  1. mauropixel

    mauropixel New Member

    Update: the problem was the firewall on my lan, there was a rule which wasn't working properly. Updating the rule all worked fine.

    Hi,
    I had a Ispconfig 3.2.4 on Ubuntu 20.04.3. All my sites have an ssl letsencrypt certificate and the "Rewrite HTTP to HTTPS" enabled. Some days ago the redirect stopped working.
    I tried to disable and reenable, upgrading ubuntu, renew certificates, I even try to force redirect via .htaccess... lats thing I do was update Ispconfig. Now I have latest 3.2.7 release, but some changes that I did to my sites are still waiting.

    Code:
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] OS version is Ubuntu 20.04.3 LTS
    
    [INFO] uptime:  18:48:27 up  1:52,  1 user,  load average: 0.15, 0.14, 0.18
    
    [INFO] memory:
                  total        used        free      shared  buff/cache   available
    Mem:          7.7Gi       2.6Gi       2.0Gi       166Mi       3.2Gi       4.7Gi
    Swap:         3.8Gi          0B       3.8Gi
    
    [INFO] systemd failed services status:
      UNIT                      LOAD   ACTIVE SUB    DESCRIPTION
    ● snap.lxd.activate.service loaded failed failed Service for snap application lxd.activate
    
    LOAD   = Reflects whether the unit definition was properly loaded.
    ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
    SUB    = The low-level unit activation state, values depend on unit type.
    
    1 loaded units listed.
    
    [INFO] ISPConfig is installed.
    
    ##### ISPCONFIG #####
    ISPConfig version is 3.2.7p1
    
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 8.0.12
    [INFO] php-cgi (used for cgi php in default vhost!) is version 7.4.25
    
    ##### PORT CHECK #####
    
    [WARN] Port 465 (SMTP server SSL) seems NOT to be listening
    
    ##### MAIL SERVER CHECK #####
    
    [WARN] I found no "submission" entry in your postfix master.cf
    [INFO] this is not critical, but if you want to offer port 587 for smtp connections you have to enable this.
    [WARN] I found no "smtps" entry in your postfix master.cf
    [INFO] this is not critical, but if you want to offer SSL for smtp (not TLS) connections you have to enable this.
    
    ##### RUNNING SERVER PROCESSES #####
    
    [INFO] I found the following web server(s):
            Apache 2 (PID 965)
    [INFO] I found the following mail server(s):
            Postfix (PID 1523)
    [INFO] I found the following pop3 server(s):
            Dovecot (PID 596)
    [INFO] I found the following imap server(s):
            Dovecot (PID 596)
    [INFO] I found the following ftp server(s):
            PureFTP (PID 1027)
    
    ##### LISTENING PORTS #####
    (only           ()
    Local           (Address)
    [anywhere]:25           (1523/master)
    [localhost]:953         (608/named)
    [anywhere]:993          (596/dovecot)
    [anywhere]:995          (596/dovecot)
    [localhost]:10023               (857/postgrey)
    [localhost]:10024               (1276/amavisd-new)
    [localhost]:10025               (1523/master)
    [localhost]:10026               (1276/amavisd-new)
    [localhost]:10027               (1523/master)
    [localhost]:11211               (607/memcached)
    [anywhere]:110          (596/dovecot)
    [anywhere]:143          (596/dovecot)
    [anywhere]:21           (1027/pure-ftpd)
    ***.***.***.***:53              (608/named)
    [localhost]:53          (608/named)
    ***.***.***.***:53              (582/systemd-resolve)
    [anywhere]:22           (696/sshd:)
    *:*:*:*::*:25           (1523/master)
    *:*:*:*::*:953          (608/named)
    *:*:*:*::*:443          (965/apache2)
    *:*:*:*::*:993          (596/dovecot)
    *:*:*:*::*:995          (596/dovecot)
    *:*:*:*::*:10024                (1276/amavisd-new)
    *:*:*:*::*:10026                (1276/amavisd-new)
    *:*:*:*::*:3306         (790/mysqld)
    [localhost]10           (596/dovecot)
    [localhost]43           (596/dovecot)
    *:*:*:*::*:8080         (965/apache2)
    *:*:*:*::*:80           (965/apache2)
    *:*:*:*::*:8081         (965/apache2)
    *:*:*:*::*:21           (1027/pure-ftpd)
    *:*:*:*::**:*:*:*::*53          (608/named)
    *:*:*:*::*:53           (608/named)
    *:*:*:*::*:22           (696/sshd:)
    
    
    
    
    ##### IPTABLES #####
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    
    
    
    
    ##### LET'S ENCRYPT #####
    Certbot is installed in /usr/bin/letsencrypt
    
    Two questions:
    1. How can I stop these blocked processes?
    2. How can I solve my problem with http/https?
    PS: I have other server with Ispconfig, but there is all ok!
    Thankyou
     

    Attached Files:

    Last edited: Oct 30, 2021
  2. Steini86

    Steini86 Active Member

    Last edited: Oct 29, 2021
  3. mauropixel

    mauropixel New Member

    hi Steini86,
    I'm using php 7.4 for both php and php-cgi.
    Now I enabled log level debug, I can see one error, when I click the error is that ftp-server, smtp-server, pop3-server and imap-server are offline but I don't think this can affect http and https behavior.
     
    Last edited: Oct 30, 2021
  4. Steini86

    Steini86 Active Member

    So, this is fixed now?
    How do you test this? What is the output of
    Code:
    curl -I <website>
     
  5. mauropixel

    mauropixel New Member

    no, I found the tasks id and killed them.
    If I try to connect to one of my sites in http response is
    Code:
    curl: (28) Failed to connect to mydomain.tld port 80: Connection timed out
    Instead if I run
    Code:
    curl -I https://mydomain.tld
    Code:
    HTTP/1.1 200 OK
    Date: Fri, 29 Oct 2021 20:44:18 GMT
    Server: Apache
    X-Content-Type-Options: nosniff
    Expires: Sun, 19 Nov 1978 05:00:00 GMT
    Cache-Control: no-cache, must-revalidate
    X-Content-Type-Options: nosniff
    Content-Language: it
    X-Frame-Options: SAMEORIGIN
    Permissions-Policy: interest-cohort=()
    X-Generator: Drupal 7 (http://drupal.org)
    Content-Type: text/html; charset=utf-8
    
     
    Last edited: Oct 29, 2021

Share This Page