V
V
Victor Umansky2017-04-22 00:03:26
Apache HTTP Server
Victor Umansky, 2017-04-22 00:03:26

Can't start apache2?

Hello everyone, look at the problem, I installed Mint 18.1 cinnamon, started installing php 5.6, apache, database, PhpPMyAdmin, and all other Linux programs.
In sudo nano file /etc/apache2/mods-enabled/dir.conf, replaced index.html with index.php.
Created info.php file and wrote <?php phpinfo(); ?>, typed localhost in the browser and got the content of the info.php text, php did not work, went to the console and looked at the status

[email protected] ~ $ sudo service apache2 status
● 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: active (running) since Птн 2017-04-21 23:03:18 EEST; 5min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 11026 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
  Process: 8910 ExecReload=/etc/init.d/apache2 reload (code=exited, status=0/SUCCESS)
  Process: 11050 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/apache2.service
           ├─11069 /usr/sbin/apache2 -k start
           ├─11072 /usr/sbin/apache2 -k start
           └─11073 /usr/sbin/apache2 -k start

Апр 21 23:03:17 Computer systemd[1]: Starting LSB: Apache2 web server...
Апр 21 23:03:17 Computer apache2[11050]:  * Starting Apache httpd web server apache2
Апр 21 23:03:17 Computer apache2[11050]: 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 this message
Апр 21 23:03:18 Computer apache2[11050]:  *
Апр 21 23:03:18 Computer systemd[1]: Started LSB: Apache2 web server.

apache seems to be enabled, then I remembered that it is possible (or necessary) to enable sudo a2enmod php5.6 but got an error
Considering dependency mpm_prefork for php5.6:
Considering conflict mpm_event for mpm_prefork:
ERROR: Module mpm_event is enabled - cannot proceed due to conflicts. It needs to be disabled first!
Considering conflict mpm_worker for mpm_prefork:
ERROR: Could not enable dependency mpm_prefork for php5.6, aborting

I started googling, I came across one form and they write that
You need to enable mpm_prefork and disable mpm_event
.
Where do I enable mpm_prefork and disable mpm_event

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Viktor Umansky, 2017-04-22
@Uman

I found a problem, the problem was that in the new version of mint, PHP version 5 disappeared, and version 7. * was installed using the apt-get install php command, and then (I did not know that php 7 was installed) I started installing php 5.6. I deleted everything (apache2 and php), cleaned everything up and reinstalled everything.
Installing php 5.6

для работы с PPA нужно установить необходимые инструменты:

apt-get install software-properties-common python-software-properties
После чего добавляем репозиторий, содержащий различные пакеты PHP:

add-apt-repository ppa:ondrej/php
В /etc/apt/sources.list.d/ появится файл со ссылкой на нужный нам репозиторий. После этого выполняем:

apt-get update
И уже можно устанавливать PHP 5.6:

So everything works for me, thanks to those who responded!

E
Egor, 2018-02-01
@Softwider

Disable mpm_event: a2dismod mpm_event
Enable mpm_prefork: a2enmod mpm_prefork

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question