Não é possível iniciar o apache no Ubuntu

1

Estou tentando instalar o php5 e o php7 no Ubuntu, porque tenho sites php5 e php7 e preciso ser capaz de mudar.

Eu tentei isso:

 sudo add-apt-repository ppa:ondrej/php

sudo apt-get update

sudo apt-get install php7.0 php5.6 php5.6-mysql php-gettext php5.6-mbstring php-xdebug libapache2-mod-php5.6 libapache2-mod-php7.0

Mas quando tento iniciar o apache:

sudo a2dismod php7.0 ; sudo a2enmod php5.6 ; sudo service apache2 restart
ERROR: Module php7.0 does not exist!
ERROR: Module php5.6 does not exist!
Job for apache2.service failed because the control process exited with error code.
See "systemctl  status apache2.service" and "journalctl  -xe" for details.

Então, o que estou recebendo nesse status:

systemctl  status apache2.service
● 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 Sun 2018-03-04 20:39:47 -03; 2min 37s ago
  Process: 12997 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

mar 04 20:39:47 user-Lenovo-ideapad-320-15IKB systemd[1]: Starting The Apache HTTP Server...
mar 04 20:39:47 user-Lenovo-ideapad-320-15IKB apachectl[12997]: apache2: Could not open configuration file /etc/apache2/apache2.conf: No such file or directory
mar 04 20:39:47 user-Lenovo-ideapad-320-15IKB apachectl[12997]: Action 'start' failed.
mar 04 20:39:47 user-Lenovo-ideapad-320-15IKB apachectl[12997]: The Apache error log may have more information.
mar 04 20:39:47 user-Lenovo-ideapad-320-15IKB systemd[1]: apache2.service: Control process exited, code=exited status=1
mar 04 20:39:47 user-Lenovo-ideapad-320-15IKB systemd[1]: Failed to start The Apache HTTP Server.
mar 04 20:39:47 user-Lenovo-ideapad-320-15IKB systemd[1]: apache2.service: Unit entered failed state.
mar 04 20:39:47 user-Lenovo-ideapad-320-15IKB systemd[1]: apache2.service: Failed with result 'exit-code'.

Alguma idéia?

    
por lucasvm1980 05.03.2018 / 00:43

0 respostas