web-dev-qa-db-fra.com

Donne une erreur: "La tâche pour Apache2.service a échoué car le processus de contrôle s'est terminé avec un code d'erreur." pour l'hôte virtuel travaillé lors du redémarrage d'Apache2

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

Je travaillais correctement avec mon projet et aujourd'hui, j'ai réinstallé Apache et php7.0. J'ai utilisé le SSL dans mon projet. Lorsque je supprime ssl de l'hôte virtuel, cela fonctionne bien. Mais quand j'ajoute ssl encore, cela donne l'erreur ci-dessus. J'ai essayé des suggestions qui ont été données pour l'erreur ci-dessus. Non alors travaillés. Quelqu'un peut-il m'aider. Merci d’avance la sortie de Sudo systemctl status Apache2.service

● 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 සි 2017-04-21 08:35:19 +0530; 26s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 3776 ExecStop=/etc/init.d/Apache2 stop (code=exited, status=0/SUCCESS)
  Process: 3114 ExecReload=/etc/init.d/Apache2 reload (code=exited, status=0/SUCCESS)
  Process: 3802 ExecStart=/etc/init.d/Apache2 start (code=exited, status=1/FAILURE)

 අප්<U+200D>රි 21 08:35:19 shyamali-pc Apache2[3802]:  * The Apache2 configtest failed.
 අප්<U+200D>රි 21 08:35:19 shyamali-pc Apache2[3802]: Output of config test was:
 අප්<U+200D>රි 21 08:35:19 shyamali-pc Apache2[3802]: AH00526: Syntax error on line 34 of /etc/Apache2/sites-enabled/TestCodeIgniter.local.conf:
 අප්<U+200D>රි 21 08:35:19 shyamali-pc Apache2[3802]: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in t
 අප්<U+200D>රි 21 08:35:19 shyamali-pc Apache2[3802]: Action 'configtest' failed.
 අප්<U+200D>රි 21 08:35:19 shyamali-pc Apache2[3802]: The Apache error log may have more information.
 අප්<U+200D>රි 21 08:35:19 shyamali-pc systemd[1]: Apache2.service: Control process exited, code=exited status=1
 අප්<U+200D>රි 21 08:35:19 shyamali-pc systemd[1]: Failed to start LSB: Apache2 web server.
 අප්<U+200D>රි 21 08:35:19 shyamali-pc systemd[1]: Apache2.service: Unit entered failed state.
 අප්<U+200D>රි 21 08:35:19 shyamali-pc systemd[1]: Apache2.service: Failed with result 'exit-code'.

Sortie de Sudo journalctl -xe

අප්<U+200D>රි 21 08:35:19 shyamali-pc systemd[1]: Apache2.service: Control process exited, code=exited status=1
අප්<U+200D>රි 21 08:35:19 shyamali-pc systemd[1]: Failed to start LSB: Apache2 web server.
-- Subject: Unit Apache2.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit Apache2.service has failed.
-- 
-- The result is failed.
අප්<U+200D>රි 21 08:35:19 shyamali-pc systemd[1]: Apache2.service: Unit entered failed state.
අප්<U+200D>රි 21 08:35:19 shyamali-pc Sudo[3770]: pam_unix(Sudo:session): session closed for user root
අප්<U+200D>රි 21 08:35:19 shyamali-pc systemd[1]: Apache2.service: Failed with result 'exit-code'.
අප්<U+200D>රි 21 08:35:45 shyamali-pc Sudo[3822]: shyamali : TTY=pts/2 ; PWD=/home/shyamali ; USER=root ; COMMAND=/bin/systemctl status Apache2.s
අප්<U+200D>රි 21 08:35:45 shyamali-pc Sudo[3822]: pam_unix(Sudo:session): session opened for user root by (uid=0)
අප්<U+200D>රි 21 08:36:46 shyamali-pc pkexec[3837]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
අප්<U+200D>රි 21 08:36:46 shyamali-pc pkexec[3837]: pam_systemd(polkit-1:session): Cannot create session: Already running in a session
අප්<U+200D>රි 21 08:36:46 shyamali-pc pkexec[3837]: shyamali: Executing command [USER=root] [TTY=unknown] [CWD=/home/shyamali] [COMMAND=/usr/lib/
අප්<U+200D>රි 21 08:37:17 shyamali-pc Sudo[3822]: pam_unix(Sudo:session): session closed for user root
අප්<U+200D>රි 21 08:39:01 shyamali-pc CRON[3859]: pam_unix(cron:session): session opened for user root by (uid=0)
අප්<U+200D>රි 21 08:39:01 shyamali-pc CRON[3860]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && /usr/lib/php/sessionclean)
අප්<U+200D>රි 21 08:39:02 shyamali-pc CRON[3859]: pam_unix(cron:session): session closed for user root
අප්<U+200D>රි 21 08:41:51 shyamali-pc AptDaemon[2213]: INFO: Quitting due to inactivity
අප්<U+200D>රි 21 08:41:51 shyamali-pc AptDaemon[2213]: INFO: Quitting was requested
අප්<U+200D>රි 21 08:41:51 shyamali-pc org.debian.apt[564]: 08:41:51 AptDaemon [INFO]: Quitting due to inactivity
අප්<U+200D>රි 21 08:41:51 shyamali-pc org.debian.apt[564]: 08:41:51 AptDaemon [INFO]: Quitting was requested
අප්<U+200D>රි 21 08:43:50 shyamali-pc systemd[1]: Starting Cleanup of        Temporary Directories...
-- Subject: Unit systemd-tmpfiles-clean.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit systemd-tmpfiles-clean.service has begun starting up.
අප්<U+200D>රි 21 08:43:50 shyamali-pc systemd-tmpfiles[3943]: [/usr/lib/tmpfiles.d/var.conf:14] Duplicate line for path "/var/log", ignoring.
අප්<U+200D>රි 21 08:43:50 shyamali-pc systemd[1]: Started Cleanup of Temporary Directories.
-- Subject: Unit systemd-tmpfiles-clean.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit systemd-tmpfiles-clean.service has finished starting up.
-- 
-- The start-up result is done.
අප්<U+200D>රි 21 08:44:53 shyamali-pc Sudo[3950]: shyamali : TTY=pts/2 ; PWD=/home/shyamali ; USER=root ; COMMAND=/bin/journalctl -xe
අප්<U+200D>රි 21 08:44:53 shyamali-pc Sudo[3950]: pam_unix(Sudo:session): session opened for user root by (uid=0)
lines 1108-1149/1149 (END)

Note: récemment, j'ai installé skype et aujourd'hui je l'ai parcouru. Mais le problème reste le même. Ces sorties sont après la suppression de skype

2
Shyamali

Le rapport de Sudo systemctl status Apache2.service indique:

Syntax error on line 34 of /etc/Apache2/sites-enabled/TestCodeIgniter.local.conf:
Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in ...

Pour une raison quelconque, le module Apache - mod_rewrite est désactivé. La solution de ce problème particulier est l'activation du module:

Sudo a2enmod rewrite
Sudo systemctl restart Apache2.service
2
pa4080