0

I just installed php and apache2 server from this tutorial

https://computingforgeeks.com/how-to-install-latest-php-on-debian/

but I cannot run php-scripts - the server seems to be down since localhost in url wont work

According to the php.ini file engine is ON

 engine = On

Right now I cannot find which port the server is listening on in the ini-file but I guess its 80?

If write apache2 in the terminal it responds

apache2: Could not open configuration file /etc/apache2/apache2.conf: No such file or directory

the path is not the same, on my system the pat is

/etc/apache2/mods-available/

and there are two files:

php7.4.conf
php7.4.load

So - how could I start the server or at the least get a grasp of whats wrong?

2
  • To check, which service is listning on which port run this command sudo ss -tnpl Commented Oct 12, 2020 at 13:37
  • ss -tulpn | grep -i httpd or ss -tulpn | grep -i apache2 Commented Oct 12, 2020 at 17:40

1 Answer 1

0

Question is did you run those two commands or not?

sudo systemctl disable --now apache2
sudo apt-get install nginx php7.4-fpm

First command disables apache2. The second one installs nginx and php-fpm version 7.4 However the tutorial does not describe how to use virtual hosts, how to enable and disable service etc.

I recommend to use this tutorial: Install PHP 7.4 on Debian 10

Besides also additionally recommend to read and learn from my website: Web server installation on mikr.us using MariaDB and MyISAM engine

You will learn how to install and configure Apache , Virtual Host and maybe other things will be also interesting for you. It is a really full guide step by step for beginners. Enjoy. If you will have any questions do not hesitate to ask me.

3
  • thanks i'll look into this issue and may accept later :) Commented Oct 12, 2020 at 18:21
  • I did not run those commands. Usually have problems with systemctl Commented Oct 12, 2020 at 19:10
  • Something more bout the error? The =answer is very enigmatic. Commented Oct 14, 2020 at 7:24

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.