[Solved] No changes - back to apache2 default page

Discussion in 'ISPConfig 3 Priority Support' started by niemand-glaumy, May 16, 2019.

  1. niemand-glaumy

    niemand-glaumy Member HowtoForge Supporter

    Hello!
    Sadly, I require your assistance and time again.

    In the last weeks, I did not work on my server at all. I did not even log in. (I am too busy renovating a house and moving there to be at my computer much.)
    Yesterday, I got a mail, telling me my certs run out, so I tried to log into ISPC, but it displays the Apache2 default page again (so do all other pages).

    I restarted the server, restarted apache2. I updated/upgraded my Ubuntu.
    I tried renewing my certs, via "certbot renew", which only brought me a parsing error.
    I tried updating ISPC, but it is already up2date (stable).

    Apache2 is running with no errors (except some Alias overlapping warning and NameVirtualHost having no effect) appearing on startup.

    netstat -ntlp displays this:
    Code:
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 0.0.0.0:10011           0.0.0.0:*               LISTEN      1169/ts3server
    tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN      1185/dovecot
    tcp        0      0 0.0.0.0:995             0.0.0.0:*               LISTEN      1185/dovecot
    tcp        0      0 127.0.0.1:10023         0.0.0.0:*               LISTEN      1464/postgrey.pid -
    tcp        0      0 127.0.0.1:10024         0.0.0.0:*               LISTEN      1634/amavisd-new (m
    tcp        0      0 127.0.0.1:10025         0.0.0.0:*               LISTEN      1831/master
    tcp        0      0 127.0.0.1:10026         0.0.0.0:*               LISTEN      1634/amavisd-new (m
    tcp        0      0 127.0.0.1:10027         0.0.0.0:*               LISTEN      1831/master
    tcp        0      0 0.0.0.0:587             0.0.0.0:*               LISTEN      1831/master
    tcp        0      0 127.0.0.1:11211         0.0.0.0:*               LISTEN      1149/memcached
    tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN      1185/dovecot
    tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN      1185/dovecot
    tcp        0      0 0.0.0.0:465             0.0.0.0:*               LISTEN      1831/master
    tcp        0      0 0.0.0.0:30033           0.0.0.0:*               LISTEN      1169/ts3server
    tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN      1729/pure-ftpd (SER
    tcp        0      0 -censored-:53       0.0.0.0:*               LISTEN      1131/named
    tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      1131/named
    tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1176/sshd
    tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      1831/master
    tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      1131/named
    tcp6       0      0 :::443                  :::*                    LISTEN      22295/apache2
    tcp6       0      0 :::10011                :::*                    LISTEN      1169/ts3server
    tcp6       0      0 :::993                  :::*                    LISTEN      1185/dovecot
    tcp6       0      0 :::64738                :::*                    LISTEN      1562/murmurd
    tcp6       0      0 :::995                  :::*                    LISTEN      1185/dovecot
    tcp6       0      0 ::1:10023               :::*                    LISTEN      1464/postgrey.pid -
    tcp6       0      0 ::1:10024               :::*                    LISTEN      1634/amavisd-new (m
    tcp6       0      0 ::1:10026               :::*                    LISTEN      1634/amavisd-new (m
    tcp6       0      0 :::3306                 :::*                    LISTEN      1556/mysqld
    tcp6       0      0 :::587                  :::*                    LISTEN      1831/master
    tcp6       0      0 :::110                  :::*                    LISTEN      1185/dovecot
    tcp6       0      0 :::143                  :::*                    LISTEN      1185/dovecot
    tcp6       0      0 :::8080                 :::*                    LISTEN      22295/apache2
    tcp6       0      0 :::8080                 :::*                    LISTEN      22295/apache2
    tcp6       0      0 :::8080                 :::*                    LISTEN      22295/apache2
    tcp6       0      0 :::80                   :::*                    LISTEN      22295/apache2
    tcp6       0      0 :::8081                 :::*                    LISTEN      22295/apache2
    tcp6       0      0 :::465                  :::*                    LISTEN      1831/master
    tcp6       0      0 :::30033                :::*                    LISTEN      1169/ts3server
    tcp6       0      0 :::21                   :::*                    LISTEN      1729/pure-ftpd (SER
    tcp6       0      0 :::53                   :::*                    LISTEN      1131/named
    tcp6       0      0 :::22                   :::*                    LISTEN      1176/sshd
    tcp6       0      0 :::25                   :::*                    LISTEN      1831/master
    tcp6       0      0 ::1:953                 :::*                    LISTEN      1131/named
    Please help me fix this! :/
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You get the apache default page when you access your server on port 8080? That's quite strange as the apache default vhost does normally not listen on that port, the ispconfig vhost should be the only vhost on 8080.

    Please run the command:

    apache2ctl -S

    and post the result.
     
  3. niemand-glaumy

    niemand-glaumy Member HowtoForge Supporter

    Code:
    AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.conf:73
    [Thu May 16 13:48:13.505220 2019] [alias:warn] [pid 26545] AH00671: The Alias directive in /etc/apache2/sites-enabled/ispconfig.conf at line 63 will probably never match because it overlaps an earlier Alias.
    [Thu May 16 13:48:13.505252 2019] [alias:warn] [pid 26545] AH00671: The Alias directive in /etc/apache2/sites-enabled/ispconfig.conf at line 65 will probably never match because it overlaps an earlier Alias.
    VirtualHost configuration:
    *:8081                 echstreme.de (/etc/apache2/sites-enabled/000-apps.vhost:9)
    *:443                  echstreme.de (/etc/apache2/sites-enabled/000-default-le-ssl.conf:2)
    *:80                   echstreme.de (/etc/apache2/sites-enabled/000-default.conf:1)
    *:8080                 echstreme.de (/etc/apache2/sites-enabled/000-ispconfig.vhost:9)
    ServerRoot: "/etc/apache2"
    Main DocumentRoot: "/var/www/html"
    Main ErrorLog: "/var/log/apache2/error.log"
    Mutex rewrite-map: using_defaults
    Mutex ssl-stapling-refresh: using_defaults
    Mutex authdigest-client: using_defaults
    Mutex ssl-stapling: using_defaults
    Mutex proxy: using_defaults
    Mutex ssl-cache: using_defaults
    Mutex default: dir="/var/lock/apache2" mechanism=fcntl
    Mutex mpm-accept: using_defaults
    Mutex authdigest-opaque: using_defaults
    Mutex watchdog-callback: using_defaults
    PidFile: "/var/run/apache2/apache2.pid"
    Define: DUMP_VHOSTS
    Define: DUMP_RUN_CFG
    Define: ENABLE_USR_LIB_CGI_BIN
    User: name="www-data" id=33
    Group: name="www-data" id=33
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Might be related to a manually created letsencrypt file. Try to run these commands:

    mv /etc/apache2/sites-enabled/000-default-le-ssl.conf /tmp/
    service apache2 restart

    does it work then?
     
  5. niemand-glaumy

    niemand-glaumy Member HowtoForge Supporter

    Done. Change: https://domain.tld now displays
    http:// does auto-https://, so that is not an option right now.
     
    Last edited: May 16, 2019
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    This means that the website has no ssl or it still redirects to the default site. You get this when you enter:

    https://server.yourdomain.tld:8080/

    Because ispconfig is on port 8080 and n0t 443, so you have to add :8080 at the end of the server hostname to access ISPConfig. Without that, it must end up in the default site.
     
  7. niemand-glaumy

    niemand-glaumy Member HowtoForge Supporter

    I knew that I had to add the port in the end. Neither that nor the websites I set up work.
    Even if I use https://hostname:8080 (instead of domain.tld:8080, which worked fine all the time), it shows the Apache2 default page.
    Enjoy trying it, hostname is web.echstreme.de, domain is the same without "web".

    Edit: Mailservers don't work, either, btw.
    It also can't be my domain provider, because all domains display the same apache2 default page.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Mail system and web server are not related directly, so you must have cghanged a lot of things to make both systems fail.

    Please post the result of the commands:

    hostname
    Hostname -f

    and the content of:

    /etc/apache2/sites-enabled/000-default.conf
    /etc/apache2/sites-enabled/000-ispconfig.vhost
     
  9. niemand-glaumy

    niemand-glaumy Member HowtoForge Supporter

    It was working fine until the day before (that's when I still got mails). That one day I posted this thread, I woke up, switched on my screen and Thunderbird was yelling at me. I did not change anything, as said in my OpeningPost. That's why I'm annoyed and confused.
    Code:
    web.echstreme.de
    [email protected]:/# hostname -f
    echstreme.de
    [email protected]:/#
    /etc/apache2/sites-enabled/000-default.conf
    Code:
    <VirtualHost *:80>
            # The ServerName directive sets the request scheme, hostname and port that
            # the server uses to identify itself. This is used when creating
            # redirection URLs. In the context of virtual hosts, the ServerName
            # specifies what hostname must appear in the request's Host: header to
            # match this virtual host. For the default virtual host (this file) this
            # value is not decisive as it is used as a last resort host regardless.
            # However, you must set it for any further virtual host explicitly.
            #ServerName www.example.com
    
            ServerAdmin [email protected]
            DocumentRoot /var/www/html
    
            # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
            # error, crit, alert, emerg.
            # It is also possible to configure the loglevel for particular
            # modules, e.g.
            #LogLevel info ssl:warn
    
            ErrorLog ${APACHE_LOG_DIR}/error.log
            CustomLog ${APACHE_LOG_DIR}/access.log combined
    
            # For most configuration files from conf-available/, which are
            # enabled or disabled at a global level, it is possible to
            # include a line for only one particular virtual host. For example the
            # following line enables the CGI configuration for this host only
            # after it has been globally disabled with "a2disconf".
            #Include conf-available/serve-cgi-bin.conf
    RewriteEngine on
    RewriteCond %{SERVER_NAME} =echstreme.de
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
    </VirtualHost>
    
    # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
    /etc/apache2/sites-enabled/000-ispconfig.vhost
    Code:
    ######################################################
    # This virtual host contains the configuration
    # for the ISPConfig controlpanel
    ######################################################
    
     Listen 8080
    NameVirtualHost *:8080
    
    <VirtualHost *:8080>
      ServerAdmin [email protected]
    
      <Directory /var/www/ispconfig/>
        <FilesMatch "\.ph(p3?|tml)$">
          SetHandler None
        </FilesMatch>
      </Directory>
      <Directory /usr/local/ispconfig/interface/web/>
        <FilesMatch "\.ph(p3?|tml)$">
          SetHandler None
        </FilesMatch>
      </Directory>
    
      <IfModule mod_fcgid.c>
        DocumentRoot /var/www/ispconfig/
        SuexecUserGroup ispconfig ispconfig
        <Directory /var/www/ispconfig/>
          Options -Indexes +FollowSymLinks +MultiViews +ExecCGI
          AllowOverride AuthConfig Indexes Limit Options FileInfo
          <FilesMatch "\.php$">
            SetHandler fcgid-script
          </FilesMatch>
          FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter .php
                Require all granted
              </Directory>
        IPCCommTimeout  7200
        MaxRequestLen 15728640
      </IfModule>
    
      <IfModule mpm_itk_module>
        DocumentRoot /usr/local/ispconfig/interface/web/
        AssignUserId ispconfig ispconfig
        AddType application/x-httpd-php .php
        <Directory /usr/local/ispconfig/interface/web>
          # php_admin_value open_basedir "/usr/local/ispconfig/interface:/usr/share:/tmp"
          Options +FollowSymLinks
          AllowOverride None
                Require all granted
                php_value magic_quotes_gpc        0
        </Directory>
      </IfModule>
    
      # ErrorLog /var/log/apache2/error.log
      # CustomLog /var/log/apache2/access.log combined
      ServerSignature Off
    
      <IfModule mod_security2.c>
        SecRuleEngine Off
      </IfModule>
    
      # SSL Configuration
      SSLEngine On
        SSLProtocol All -SSLv3
        SSLCertificateFile /usr/local/ispconfig/interface/ssl/ispserver.crt
      SSLCertificateKeyFile /usr/local/ispconfig/interface/ssl/ispserver.key
      #SSLCACertificateFile /usr/local/ispconfig/interface/ssl/ispserver.bundle
    
      SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA3$
      SSLHonorCipherOrder On
    
      <IfModule mod_headers.c>
        Header always add Strict-Transport-Security "max-age=15768000"
            RequestHeader unset Proxy early
      </IfModule>
    
        SSLUseStapling On
      SSLStaplingResponderTimeout 5
      SSLStaplingReturnResponderErrors Off
      </VirtualHost>
    
    <IfModule mod_ssl.c>
      SSLStaplingCache shmcb:/var/run/ocsp(128000)
    </IfModule>
    
    <Directory /var/www/php-cgi-scripts>
      AllowOverride None
        Require all denied
      </Directory>
    
    <Directory /var/www/php-fcgi-scripts>
      AllowOverride None
        Require all denied
      </Directory>
     
  10. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  11. niemand-glaumy

    niemand-glaumy Member HowtoForge Supporter

    You linked step 8.
    Strangely, there is no "/etc/netplan/" and netplan commands are not found.
    That may be the reason. But what is the reason for it disappearing? Oo
    Do I need to reinstall it via "apt install netplan.io"?

    ls -l in /etc/
    Code:
    -rw-r--r-- 1 root    root           8338 Feb 15  2017 nanorc
    -rw-r--r-- 1 root    root            767 Okt 25  2014 netconfig
    drwxr-xr-x 7 root    root           4096 Mär  4 21:57 network
    drwxr-xr-x 8 root    root           4096 Feb 13 21:09 NetworkManager
    -rw-r--r-- 1 root    root             91 Okt 22  2015 networks
    drwxr-xr-x 2 root    root           4096 Nov  4  2017 newt
    -----

    /etc/hosts:
    Code:
    127.0.0.1       localhost
    94.130.164.158  echstreme.de web.echstreme.de
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     localhost ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    is now changed to:
    Code:
    127.0.0.1       localhost
    94.130.164.158  web.echstreme.de web
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     localhost ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    and the output is:
    Code:
    [email protected]:/etc# hostname
    web
    [email protected]:/etc# hostname -f
    web.echstreme.de
    Rebooted afterwards.

    ----

    This threw me an error on apache2 start:
    Code:
    Mai 18 16:46:19 web apache2[2895]: AH00526: Syntax error on line 1 of /etc/apache2/sites-enabled/.000-ispconfig.vhost.swp:
    Mai 18 16:46:19 web apache2[2895]: Invalid command 'b0nano', perhaps misspelled or defined by a module not included in the server configuration
    I do not know what that file is or where it came from. I moved it to "sites-disabled" and apache2 starts again fine.

    Problem is still not solved. All domains show the default apache2 page, as does :8080.
     
  12. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    If you have working network connection, editing or installing netplan stuff is not needed.
    The corrections you did are steps in the right direction.
    Did you look at line 1 in file /etc/apache2/sites-enabled/.000-ispconfig.vhost.swp? But to me that file looks unnecessary, I don't know either why it was there.
    Have you examined apache access and error logs when you try to go to those websites? That may show what is happening.
    Forcing reconfigure services may fix the setup now that your hostname is fixed. https://www.howtoforge.com/communit...vices-without-uninstalling.73260/#post-344863
     
  13. niemand-glaumy

    niemand-glaumy Member HowtoForge Supporter

    OMFG.
    I solved it. Thank you for all your time and sorry for wasting it. -.-

    The moron that I am did not pay attention to the login-screen. I just saw it told me it was Ubuntu 16.04. Somehow my old VM started again after an automatic Windows Update, and it started before the 18.04-VM.

    Solved that issue by disabling the autostart of said 16.04-VM within the Hyper-V settings.


    If you happen to read this after my edit:
    After starting up the VM18, I had the problem that my mails were queueing.
    Like: "(connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)".
    I edited the master.cf (I changed the port to 10024), what worked and now the error-message "(connect to 127.0.0.1[127.0.0.1]:10026: Connection refused)" occurs on outgoing mail. Where do I have to edit that? Changing the second port in the master.cf to 10026 does not work.

    New EDIT:
    I somehow fixed it by editing the master.cf (correcting the ports on the bottom of the file) and restarting the service. :)
     
    Last edited: May 20, 2019 at 12:34 AM
    till likes this.

Share This Page