After Apache2 Re install - lost access to admin and all sites

Discussion in 'Installation/Configuration' started by LAKSHA, Sep 21, 2019.

  1. LAKSHA

    LAKSHA Member

    These is absolutely no file in the folder /var/log/apache2/
     
  2. LAKSHA

    LAKSHA Member

    Please find the latest output after reset failed

    Code:
    root@host:~# systemctl reset-failed
    
    root@host:~# systemctl --failed
    
    0 loaded units listed. Pass --all to see loaded but inactive units, too.
    To show all installed unit files use 'systemctl list-unit-files'.
    
    root@host:~# systemctl list-unit-files
    
    UNIT FILE                              STATE
    proc-sys-fs-binfmt_misc.automount      static
    dev-hugepages.mount                    static
    dev-mqueue.mount                       static
    proc-sys-fs-binfmt_misc.mount          static
    sys-fs-fuse-connections.mount          static
    sys-kernel-config.mount                static
    sys-kernel-debug.mount                 static
    tmp.mount                              enabled
    systemd-ask-password-console.path      static
    systemd-ask-password-wall.path         static
    [email protected]                        disabled
    bind9-resolvconf.service               disabled
    bind9.service                          enabled
    bootlogd.service                       masked
    bootlogs.service                       masked
    bootmisc.service                       masked
    checkfs.service                        masked
    checkroot-bootclean.service            masked
    checkroot.service                      masked
    clamav-daemon.service                  enabled
    clamav-freshclam.service               enabled
    console-getty.service                  disabled
    console-shell.service                  disabled
    [email protected]               static
    cron.service                           enabled
    cryptdisks-early.service               masked
    cryptdisks.service                     masked
    dbus-org.freedesktop.hostname1.service static
    
    [2]+  Stopped                 systemctl list-unit-files
    
    
    root@host:~# systemctl
    
    UNIT                                    LOAD   ACTIVE SUB       DESCRIPTION
    sys-devices-virtual-net-venet0.device   loaded active plugged   /sys/devices/virtual/net/venet0
    sys-subsystem-net-devices-venet0.device loaded active plugged   /sys/subsystem/net/devices/venet0
    -.mount                                 loaded active mounted   /
    dev-mqueue.mount                        loaded active mounted   POSIX Message Queue File System
    run-shm.mount                           loaded active mounted   /run/shm
    tmp.mount                               loaded active mounted   Temporary Directory
    var-www-clients-client1-web1-log.mount  loaded active mounted   /var/www/clients/client1/web1/log
    var-www-clients-client1-webXX-log.mount loaded active mounted   /var/www/clients/client1/webXX/log
    
    
    [3]+  Stopped                 systemctl
    
    root@host:~# systemctl status
    
    <E2><97><8F> host
        State: running
         Jobs: 0 queued
       Failed: 0 units
        Since: Sun 2019-09-22 05:29:57 EDT; 2h 47min ago
       CGroup: /
               <E2><94><9C><E2><94><80>1 init -z
               <E2><94><94><E2><94><80>system.slice
                 <E2><94><9C><E2><94><80>dovecot.service
                 <E2><94><82> <E2><94><9C><E2><94><80>11051 /usr/sbin/dovecot -F
                 <E2><94><82> <E2><94><9C><E2><94><80>11069 dovecot/anvil
                 <E2><94><82> <E2><94><9C><E2><94><80>11070 dovecot/log
                 <E2><94><82> <E2><94><9C><E2><94><80>11775 dovecot/auth
                 <E2><94><82> <E2><94><9C><E2><94><80>11958 dovecot/auth -w
                 <E2><94><82> <E2><94><94><E2><94><80>11959 dovecot/config
                 <E2><94><9C><E2><94><80>postfix.service
                 <E2><94><82> <E2><94><9C><E2><94><80>11043 /usr/lib/postfix/master
                 <E2><94><82> <E2><94><9C><E2><94><80>11047 pickup -l -t unix -u -c
                 <E2><94><82> <E2><94><9C><E2><94><80>11048 qmgr -l -t unix -u
                 <E2><94><82> <E2><94><9C><E2><94><80>11771 smtpd -n smtp -t inet -u -c -o stress= -s 2
                 <E2><94><82> <E2><94><9C><E2><94><80>11773 tlsmgr -l -t unix -u -c
                 <E2><94><82> <E2><94><94><E2><94><80>11774 anvil -l -t unix -u -c
                 <E2><94><9C><E2><94><80>pure-ftpd-mysql.service
                 <E2><94><82> <E2><94><94><E2><94><80>10902 pure-ftpd (SERVER)
                 <E2><94><9C><E2><94><80>console-getty.service
                 <E2><94><82> <E2><94><94><E2><94><80>441 /sbin/agetty --noclear --keep-baud console 115200 38400 9600 vt102
                 <E2><94><9C><E2><94><80>amavis.service
                 <E2><94><82> <E2><94><9C><E2><94><80> 861 /usr/sbin/amavisd-new (master
                 <E2><94><82> <E2><94><9C><E2><94><80>1185 /usr/sbin/amavisd-new (virgin child
    
    [4]+  Stopped                 systemctl status
    
    
    
     
  3. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    That tunnel connection failed is strange. Just for kicks, go to
    https://downforeveryoneorjustme.com
    and type the URL for one of your servers websites there.
    Can you ping your server IP-number and hostname?
     
  4. LAKSHA

    LAKSHA Member

    IT says down for all, later on when i used this
    https://check-host.net/ip-info?host=*.*.*.*
    its pointing to a different domain name.
    Have i been compromised?
    my control panel at host is looking normal and pointing correctly.
    I am raising a ticket to my host.
    Lets wait for their reply and see.
    WoW This is something even more devastating then i thought.
    But i hope not.
     
  5. LAKSHA

    LAKSHA Member

    Ok my hosting guy in London something to their enviornment, i ended up with no rDns , now i think that was the main reason for lets encrypt to throw error yesterday on one of my site and that led me to the tailspin since yesterday.
    In the course i might have disturbed my config horriblly and i have lost my symlinks.
    now i have put the rdns correctly at the host.
    again will try to resolve once rdns populated
    It does not mean that there is no problem from my end but my host started it all.
    Time to look for another .
    Will be updating you on this .
    Regards,
    Thanks @Taleman
     
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    My understanding is Let's Encrypt is not affected by reverse dns.
    Is this about symlinks when restoring from tar file? Or are symlinks gone from your host? Which symlinks on which directories?
     
  7. LAKSHA

    LAKSHA Member

    Here is the output
    Code:
    root@host:~# whereis apache2
    apache2: /usr/lib/apache2 /usr/local/lib/apache2 /usr/share/apache2
    
     
  8. LAKSHA

    LAKSHA Member

    I see no apache2 folder in etc folder
    Do i reinstall it ? If so then could you guide me to any tut or thread ?
     
  9. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    What connection does whereis have to symbolic links?
     
  10. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    What is output of commands
    Code:
    apt-cache policy apache2
    ls -lhd /etc/apac*
    uptime
    
     
  11. LAKSHA

    LAKSHA Member

    They were in site-enabled folder, Now the entire apache2 folder is missing from etc folder.
    Do you think thats the problem ?
    as i am still not getting any control panel.
    I can share my domain and IP if you wish.
    Please do let me know , Thanks @Taleman
     
  12. LAKSHA

    LAKSHA Member

    Code:
    root@host:~# apt-cache policy apache2
    apache2:
      Installed: (none)
      Candidate: 2.4.10-10+deb8u15
      Version table:
         2.4.10-10+deb8u15 0
            500 http://security.debian.org/ jessie/updates/main amd64 Packages
    
    root@host:~# ls -lhd /etc/apac*
    ls: cannot access /etc/apac*: No such file or directory
    
    root@host:~# uptime
     12:45:16 up  1:13,  1 user,  load average: 0.05, 0.01, 0.00
    
    root@host:~#
    
     
  13. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You started this thread with writing you reinstalled apache.
    How come now there is no apache installed?
     
  14. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You posted htf_report which reads:
    Code:
    [INFO] I found the following web server(s):
        Apache 2 (PID 12210)
    What shows
    Code:
    systemctl status apache2
    If no apache2 is installed, websites and ISPConfig panel can not work.
     
  15. LAKSHA

    LAKSHA Member

    It was there , and since morning i am trying to resolve, Maybe in between i could have followed wrong process. Actually i have been up on the same thing since i started this thread, Just slept for 4 hours and not moved a inch since many hours now.
    I am sorry , but trust me it was there very well til few hours back.
    I will reinstall it again!
     
  16. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Install Apache following the instructions in ISPCenfig perfect Server Guide for your version of OS.
    After successful install, force reconfigure services.
     
  17. LAKSHA

    LAKSHA Member

    I am getting this error!
    Code:
    root@host:~# apt-get install apache2
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
     apache2 : Depends: apache2-bin (= 2.4.10-10+deb8u15) but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    root@host:~#
    
    Now i recollect i went to some status file and removed some entries because some tutorial was asking me to do it.
    :-(
     
  18. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Is this server so important that you are willing to use paid support? It is available:
    https://www.ispconfig.org/support/
    I have not used it, but it is good support from what I understand.
     
  19. LAKSHA

    LAKSHA Member

    First let me thank you really for all your time and efforts!
    I wish i could pay for this but as usual i will need to consult my other executives for the same !
    Also it seems to be a broken environment, so it make sense to start from the scratch !
    I have a suggestion, If you guys at HowtoForge could come-up with nominal charges for silly issues, IT would save lots of time for everyone.
    But i really appreciate your time @Taleman
    Please do let me know how else i could support you, I would like to give you a positive review anywhere you like me to.
    Also , Hey @till ,Hi please do think about my suggestions
    I will mostly re install everything from scratch !
    Regards,
    NOTE - YOU GUYS ARE AWESOME :)
     
  20. LAKSHA

    LAKSHA Member

    Hello @Taleman I am stuck with
    Code:
    apt-get install apache2
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
     apache2 : Depends: apache2-bin (= 2.4.10-10+deb8u15) but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    
    I tried manually installing .deb but it is asking for all the dependencies
    I tried manually installing apache2 with apr util and apr path by putting the latest apr and apr util there
    Code:
    ./configure --prefix=/usr/local/apache2 –with-apr=/usr/local/apr/  –with-apr-util=/usr/local/apr-util/
    but its just not taking it

    Code:
     ./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/
    checking for chosen layout... Apache
    checking for working mkdir -p... yes
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking build system type... x86_64-pc-linux-gnu
    checking host system type... x86_64-pc-linux-gnu
    checking target system type... x86_64-pc-linux-gnu
    configure:
    configure: Configuring Apache Portable Runtime library...
    configure:
    checking for APR... configure: error: the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file.
    
    I have purged all the apache package and then tried to install it from apt-get but it says apache2-bin unmet dependency .
    I cannot install apache2-bin from source list even after updating it.
    I try to install apache2-bin and install apache2 then it says apache2-bin not configured and unmet dependency
    going crazy! Please help!
     

Share This Page