1

I tried to add new domain but after I tried to restart apache I get this:

● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: failed (Result: exit-code) since Thu 2017-08-17 07:58:06 UTC; 15s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2026 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)

Aug 17 07:58:06 server apache2[2026]: AH00112: Warning: DocumentRoot [/etc/sentora/panel/] does not exist
Aug 17 07:58:06 server apache2[2026]: AH00112: Warning: DocumentRoot [/var/sentora/hostdata/trgovac/public_html/trgovac_rs] does not exist
Aug 17 07:58:06 server apache2[2026]: (2)No such file or directory: AH02291: Cannot access directory '/var/sentora/logs/domains/banko-sistemi/' for error log of vhost defined at /etc/apache2/sites-enabled/svi.conf:687
Aug 17 07:58:06 server apache2[2026]: AH00014: Configuration check failed
Aug 17 07:58:06 server apache2[2026]: Action 'configtest' failed.
Aug 17 07:58:06 server apache2[2026]: The Apache error log may have more information.
Aug 17 07:58:06 server systemd[1]: apache2.service: Control process exited, code=exited status=1
Aug 17 07:58:06 server systemd[1]: Failed to start LSB: Apache2 web server.
Aug 17 07:58:06 server systemd[1]: apache2.service: Unit entered failed state.
Aug 17 07:58:06 server systemd[1]: apache2.service: Failed with result 'exit-code'.

Does anybody have an idea why is this happening? How can I restart apache?

3
  • try sudo service --status-all : to check all the services and verify if there is + or - sign on left side of apache . Aug 17, 2017 at 8:03
  • 1
    People not reading their error messages make me sad :(
    – Ziazis
    Aug 17, 2017 at 8:24
  • Chombe, have a read through those error messages. It looks like you have configured a directory that doesn't exist. Maybe you deleted the directory?
    – Goran
    Aug 18, 2017 at 3:36

2 Answers 2

1

There are some permission problems in your installation. You can find that from the last 2 lines of the following logs:

Aug 17 07:58:06 server apache2[2026]: AH00112: Warning: DocumentRoot [/etc/sentora/panel/] does not exist
Aug 17 07:58:06 server apache2[2026]: AH00112: Warning: DocumentRoot [/var/sentora/hostdata/trgovac/public_html/trgovac_rs] does not exist
Aug 17 07:58:06 server apache2[2026]: (2)No such file or directory: AH02291: Cannot access directory '/var/sentora/logs/domains/banko-sistemi/' for error log of vhost defined at /etc/apache2/sites-enabled/svi.conf:687
Aug 17 07:58:06 server apache2[2026]: AH00014: Configuration check failed

There are 2 warnings (These are only warnings and won't let Apache fail to start but they are worth noting). You have configured somewhere in your virtual hosts' configurations 2 document roots that do not exist. One in /etc/sentora/panel/ and another in /var/sentora/hostdata/trgovac/public_html/trgovac_rs.

However, the error that is causing Apache to fail to start, is the fact that it is trying to create/modify a log that Apache doesn't have access to in /var/sentora/logs/domains/banko-sistemi/.

To fix that, make sure the directory exists, if it doesn't create it and give access to Apache to modify it:

sudo mkdir -p /var/sentora/logs/domains/banko-sistemi
sudo chown -u www-data /var/sentora/logs/domains/banko-sistemi

In case you have changed the default Apache user, change www-data to whatever user you chose for Apache.

0

I solve this. I create the directory "banko-sistemi" on this location /var/sentora/logs/domains/banko-sistemi/.

After that I restart apache without any problem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .