Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

johndoee's avatar

Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.

I install laravel in ubuntu aws EC2 server. after install laravel

 sudo systemctl restart apache2

it show error

Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.

how can fix

0 likes
5 replies
Sinnbeck's avatar

See "systemctl status apache2.service" and "journalctl -xe" for details.

johndoee's avatar

@Sinnbeck it show

Oct 05 20:18:35 ip-172-31-18-92 systemd[1]: Starting The Apache HTTP Server...
Oct 05 20:18:35 ip-172-31-18-92 apachectl[39603]: apache2: Syntax error on line 225 of /etc/apache2/apache2.conf: Syntax error on line 8 of /etc/apache2/sites-enabled/>

johndoee's avatar

@Sinnbeck here is avalable.conf file

<VirtualHost *:80> 
ServerAdmin root@localhost 
ServerName localhost:8000
DocumentRoot /var/www/html/laravel/public 
<Directory /> Options FollowSymLinks AllowOverride None </Directory> 
<Directory /var/www/html/laravel> AllowOverride All </Directory> 
ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined 
</VirtualHost>


Sinnbeck's avatar

@zwarkyaw I don't think you can have a port in the servername

ServerName localhost:8000

What are you trying to do here?

johndoee's avatar

@Sinnbeck although apache2 is running

ubuntu@ip-172-31-88-129:/var/www/html$ sudo systemctl status apache2.service
● apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2022-10-05 21:44:18 UTC; 5min ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 37732 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
   Main PID: 37736 (apache2)
      Tasks: 55 (limit: 1143)
     Memory: 4.8M
     CGroup: /system.slice/apache2.service
             ├─37736 /usr/sbin/apache2 -k start
             ├─37737 /usr/sbin/apache2 -k start
             └─37738 /usr/sbin/apache2 -k start



here is laravel.conf

<VirtualHost *:80>
ServerName 54.89.67.17
ServerAdmin [email protected]
DocumentRoot /var/www/html/projectname/public
<Directory /var/www/html/projectname> AllowOverride All
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>


when i try to run on browser , it show

This site can’t be reached54.89.67.17 took too long to respond.
Try:

Checking the connection
Checking the proxy and the firewall
Running Windows Network Diagnostics

i off firewall and try again , same error, why?

Please or to participate in this conversation.