apache2 di ubuntu gagal restart

Ketika memulai ulang apache2 di ubuntu 20.04 muncul peringatan

 

apache2.service - The Apache HTTP Server

     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)

     Active: failed (Result: exit-code) since Sat 2022-03-05 15:10:16 WIB; 2min 9s ago

       Docs: https://httpd.apache.org/docs/2.4/

    Process: 69166 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)


Mar 05 15:10:16 iux systemd[1]: Starting The Apache HTTP Server...

Mar 05 15:10:16 iux apachectl[69169]: AH00526: Syntax error on line 5 of /etc/apache2/sites-enabled/yasisa.tutorial.conf:

Mar 05 15:10:16 iux apachectl[69169]: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the >

Mar 05 15:10:16 iux apachectl[69166]: Action 'start' failed.

Mar 05 15:10:16 iux apachectl[69166]: The Apache error log may have more information.

Mar 05 15:10:16 iux systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE

Mar 05 15:10:16 iux systemd[1]: apache2.service: Failed with result 'exit-code'.

Mar 05 15:10:16 iux systemd[1]: Failed to start The Apache HTTP Server.


Solusinya

aktifkan mode rewrite

sudo a2enmod rewrite 

kemudian coba restart

sudo systemctl restart apache2 

lakukan pengecekan

sudo systemctl status apache2 

 



Komentar

Postingan populer dari blog ini

Kelebihan Kekurangan Open source

Lisensi-lisensi Opensource dan bagaimana programmer dapat uang?

Mengenal gambar digital