Apache2 will not start

I installed the ubuntu server on an old computer using webmin. I'm not sure what is going on, but I restarted the server and when it boots up it now gets it when Apache tries to start.

* Starting web server apache2 apache2: Syntax error on line 237 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/sites-enabled/000-default: No such file or directory Action 'start' failed. The Apache error log may have more information. 

I checked this file on this line and it looks like this:

 # Include the virtual host configurations: Include sites-enabled/ 

I uninstalled Apache and installed it again, but not sure why it still does not work.

+6
source share
3 answers

As Qben also answered, the problem was an invalid symbolic link in a site-enabled folder. Removing the corrupted symbolic link and adding a valid fix fixes the problem.

+4
source

You do not have a default site:

 /etc/apache2/sites-enabled/000-default: No such file or directory 

site-enabled should contain symbolic links to files in site-available , and I think your symbolic link 000-default does not refer to the real file in site-available .

I think this Ubuntu guide might be of interest to you.

+4
source

One reason may be that you may have some kind of site that is not included. To verify that

  • Go to /etc/apache2/sites-enabled
  • of many / some [sitename].conf files, one / some may be crossed
  • Delete found crossed
  • Restart apache server

    sudo service apache2 restart .

Hope this helps you, but there may be another reason. Thanks.

+1
source

Source: https://habr.com/ru/post/955581/


All Articles