lundi 29 octobre 2018

'sudo service apache2 start' doesn't work on ubuntu18.04

I've installed laravel on my ubuntu18.04. And I made /etc/apache2/sites-available/laravel.conf file.

<VirtualHost *:80>
    ServerName yourdomain.tld

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html/your-project/public

    <Directory /var/www/html/your-project>
        AllowOverride All
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Then run these code on terminal:

sudo a2dissite 000-default.conf
sudo a2ensite laravel.conf
sudo a2enmod rewrite
sudo service apache2 restart
But when I run "sudo service apache2 restart", An error code occurs.
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.

And I ran both of "systemctl status apache2.service" and "journalctl -xe" but there were also error codes:

apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: failed (Result: exit-code) since Mon 2018-10-29 01:48:17 PDT; 5min ago
  Process: 40882 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

Oct 29 01:48:17 ubuntu apachectl[40882]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress thi
Oct 29 01:48:17 ubuntu apachectl[40882]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Oct 29 01:48:17 ubuntu apachectl[40882]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Oct 29 01:48:17 ubuntu apachectl[40882]: no listening sockets available, shutting down
Oct 29 01:48:17 ubuntu apachectl[40882]: AH00015: Unable to open logs
Oct 29 01:48:17 ubuntu apachectl[40882]: Action 'start' failed.
Oct 29 01:48:17 ubuntu apachectl[40882]: The Apache error log may have more information.
Oct 29 01:48:17 ubuntu systemd[1]: apache2.service: Control process exited, code=exited status=1
Oct 29 01:48:17 ubuntu systemd[1]: apache2.service: Failed with result 'exit-code'.
Oct 29 01:48:17 ubuntu systemd[1]: Failed to start The Apache HTTP Server.

How can I start Apache Http server. Somebody help me!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire