[SOLVED]I can't access ispconfig panel nor my websites

Discussion in 'Installation/Configuration' started by forethan, Nov 29, 2017.

  1. forethan

    forethan New Member

  2. Taleman

    Taleman Member HowtoForge Supporter

    Is the web server running on Your host? Read the logs to see what is wrong in the setup.
     
  3. forethan

    forethan New Member

    Yes it is. One of my personnal computer in my cellar.
    Where i can find the logs you speak? (sorry i'm a little noob)
     
  4. Taleman

    Taleman Member HowtoForge Supporter

    In Debian log files are in /var/log. Check with
    Code:
    ls -lht /var/log | head
    which are the latest logs and examine those files.
    As an aside, since the htf-common-issues.php did not work, check also network is up. For example try command
    Code:
    ping -c 3 8.8.8.8
    If the ping command gets packets transmitted, try again the https://www.howtoforge.com/communit...nfig-panel-nor-my-websites.77891/#post-368457 and make sure You copy and paste the complete command all in one line.
     
    forethan likes this.
  5. forethan

    forethan New Member

    total 19M
    -rw-r----- 1 root adm 924K nov. 29 11:53 auth.log
    -rw-r----- 1 root adm 155K nov. 29 11:53 syslog
    -rw-r----- 1 root adm 286K nov. 29 11:50 mail.info
    -rw-r--r-- 1 root adm 286K nov. 29 11:50 mail.log
    -rw-r--r-- 1 root adm 277K nov. 29 11:50 messages
    -rw-r----- 1 root adm 220K nov. 29 11:42 daemon.log
    -rw-rw-r-- 1 root utmp 1,4M nov. 29 11:35 lastlog
    -rw-rw-r-- 1 root utmp 13K nov. 29 11:35 wtmp
    -rw-r----- 1 root adm 18K nov. 29 11:23 fail2ban.log

    The ping works.
    -rw-r----- 1 root adm 925K nov. 29 11:56 auth.log
    -rw-r----- 1 root adm 157K nov. 29 11:56 syslog
    -rw-r----- 1 root adm 287K nov. 29 11:55 mail.info
    -rw-r--r-- 1 root adm 287K nov. 29 11:55 mail.log
    -rw-r--r-- 1 root adm 277K nov. 29 11:55 messages
    -rw-r----- 1 root adm 220K nov. 29 11:42 daemon.log
    -rw-rw-r-- 1 root utmp 1,4M nov. 29 11:35 lastlog
    -rw-rw-r-- 1 root utmp 13K nov. 29 11:35 wtmp
    -rw-r----- 1 root adm 18K nov. 29 11:23 fail2ban.log
     
  6. Taleman

    Taleman Member HowtoForge Supporter

    How have you checked your web server is running? I suspect it is not running.
     
    forethan likes this.
  7. forethan

    forethan New Member

    service apache2 restart
    reboot now
    ...
    How to start it???
     
  8. Taleman

    Taleman Member HowtoForge Supporter

    That restarts Apache2, but does not guarantee it starts or stays running. Check with
    Code:
    service apache2 status
    Also useful command is
    Code:
    apachectl -S
    
     
    forethan likes this.
  9. forethan

    forethan New Member

    Thanks for taking the time to helps me.

    Here is the results of an apache2 status :

    â apache2.service - LSB: Apache2 web server
    Loaded: loaded (/etc/init.d/apache2)
    Drop-In: /lib/systemd/system/apache2.service.d
    ââforking.conf
    Active: inactive (dead) since mar. 2017-11-28 19:42:32 CET; 22h ago
    Process: 1354 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
    Process: 595 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)

    nov. 28 19:42:24 jenny apache2[595]: Starting web server: apache2AH00548: N...73
    nov. 28 19:42:26 jenny apache2[595]: Action 'start' failed.
    nov. 28 19:42:26 jenny apache2[595]: The Apache error log may have more inf...n.
    nov. 28 19:42:26 jenny apache2[595]: .
    nov. 28 19:42:26 jenny systemd[1]: Started LSB: Apache2 web server.
    nov. 28 19:42:32 jenny apache2[1354]: Stopping web server: apache2.
    Hint: Some lines were ellipsized, use -l to show in full.

    And after restart apache2 :

    â apache2.service - LSB: Apache2 web server
    Loaded: loaded (/etc/init.d/apache2)
    Drop-In: /lib/systemd/system/apache2.service.d
    ââforking.conf
    Active: active (running) since mer. 2017-11-29 18:23:56 CET; 3s ago
    Process: 20194 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
    Process: 20221 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)
    CGroup: /system.slice/apache2.service
    ââ20240 PassengerHelperAgent
    ââ20247 PassengerLoggingAgent
    ââ20256 PassengerWatchdog (cleaning up...)

    nov. 29 18:23:56 jenny apache2[20221]: Starting web server: apache2AH00548:...73
    nov. 29 18:23:56 jenny apache2[20221]: Action 'start' failed.
    nov. 29 18:23:56 jenny apache2[20221]: The Apache error log may have more i...n.
    nov. 29 18:23:56 jenny apache2[20221]: .
    nov. 29 18:23:56 jenny systemd[1]: Started LSB: Apache2 web server.
    Hint: Some lines were ellipsized, use -l to show in full.
     
  10. Taleman

    Taleman Member HowtoForge Supporter

    The web server is indeed not running. To see why it stops read the Apache logs, find the interesting files like this:
    Code:
    ls -lth /var/log/apache2/ | head
     
    forethan likes this.
  11. forethan

    forethan New Member

    error. log : AH00016: Configuration Failed
    I think it's something to do with ssl.
    All my websites are ssl and normally ispconfig do the job automatically when you tick SSL / Let's encrypt in the website manager.
    I don't know what's wrong.
     
  12. Taleman

    Taleman Member HowtoForge Supporter

  13. forethan

    forethan New Member

    Yes i've already seen this page when searching on google and i tried what the guy says but i've failed.

    I don't understand where he found an error with this part of the log :
    [pid 6068] munmap(0x7f45c6c38000, 4096) = 0
    [pid 6068] open("/etc/ssl/private/a_website_ssl.key", O_RDONLY) = 45
    [pid 6068] fstat(45, {st_mode=S_IFREG|0644, st_size=1704, ...}) = 0
    [pid 6068] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f45c6c38000
    [pid 6068] read(45, "-----BEGIN PRIVATE KEY-----\nMIIE"..., 4096) = 1704
    [pid 6068] close(45)

    If i run this : strace -f apache2ctl start
    Is there an option in Putty to find text inside the windows(like ctrl-f for chrome) ???Because the result of this command gave lots of results.
     
  14. Taleman

    Taleman Member HowtoForge Supporter

    Redirect the command output to a file like this:
    Code:
     strace -f apache2ctl start > /tmp/testing.txt
    Then use less (maybe install it with apt-get install less) to read the file.
    Code:
    less /tmp/testing.txt
    Use key h while running less to see commands. For example / searches forward for pattern.

    Also:
    https://ryanstutorials.net/linuxtutorial/
    Or find more Linux quides with Internet search engines.
    Or purchase a book: http://sobell.com/UB4/index.html
     
  15. forethan

    forethan New Member

    Ok i've done it and found which website is causing the problem (by log all in putty and save as a txt file).
    so here is the problem :
    [pid 8188] open("/var/www/clients/client0/web6/ssl/website.tk.key", O_RDONLY) = 27
    [pid 8188] fstat(27, {st_mode=S_IFREG|0644, st_size=1675, ...}) = 0
    [pid 8188] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7efed2afd000
    [pid 8188] read(27, "-----BEGIN RSA PRIVATE KEY-----\n"..., 4096) = 1675
    [pid 8188] close(27) = 0
    [pid 8188] munmap(0x7efed2afd000, 4096) = 0
    [pid 8188] open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 27
    [pid 8188] fstat(27, {st_mode=S_IFREG|0644, st_size=2945, ...}) = 0
    [pid 8188] fstat(27, {st_mode=S_IFREG|0644, st_size=2945, ...}) = 0
    [pid 8188] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7efed2afd000
    [pid 8188] read(27, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\f\0\0\0\f\0\0\0\0"..., 4096) = 2945
    [pid 8188] lseek(27, -1863, SEEK_CUR) = 1082
    [pid 8188] read(27, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\r\0\0\0\r\0\0\0\0"..., 4096) = 1863
    [pid 8188] close(27) = 0
    [pid 8188] munmap(0x7efed2afd000, 4096) = 0
    [pid 8188] write(13, "[Thu Nov 30 12:17:46.329514 2017"..., 246) = 246
    [pid 8188] write(2, "AH00016: Configuration Failed\n", 30) = 30

    But when i try to do : a2dissite website.tk.conf or a2dissite website.conf or a2dissite web6.conf
    All the times i've got this error:
    ERROR: Site website.tk does not exist...
     
    Last edited: Nov 30, 2017
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Go to the /etc/apache2/sites-enabled/ directory and delete the symlink with the name of that site there. Then restart apache.
     
    forethan likes this.
  17. forethan

    forethan New Member

    And it works. The ispconfig panel is back and all my websites too.
    http://website.tk redirect to the apache debian homepage which is good
    but
    https://website.tk redirect to another website in my server(after that chrome advice to me that recup-photos.tk isn't a secure website)

    The website website.tk was created recently for testing purpose only( ive seen a good tutorial of html+css and want to create my own website from scratch (must be better than the traditionnal wordpress+template or bootstrap+template)

    What do you think happened???
     
    Last edited: Nov 30, 2017
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    Either the key was changed or the cert was changed or key or cert file was corrupted so that the result is that the cert can't be opened with that key anymore. When this happens, then apache fails without a usable error in the logs (which I find quite annoying btw, don't know why the apache dev's don't throw a normal error). When ISPConfig changes an ssl cert or key, then it tests if apache starts and does a rollback of the last working config in case of a failure. So either this config check was disabled under system > server config > web in ISPconfig or the cert or key was changed / corrupted outside of ispconfig so this safety mechanism could not kick in.
     
    forethan likes this.
  19. forethan

    forethan New Member

    Ok great and thanks for all the answers you made a pretty good job on this forum! For free!!!

    Now ive launched a "clamscan" because when i do apt-get update it works but it says : can't access hvvm download so maybe i've been haked???!!
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    I don't think you're hacked, so don't worry about that message, the error just means that apt can't access the download server of the HHVM project at the moment, that's uncritical. It can be that their server is down for maintenance or maybe they changed the URL.
     
    forethan likes this.

Share This Page