Home wordpress I can not remove the default Apache2 Ubuntu Default page

I can not remove the default Apache2 Ubuntu Default page

Author

Date

Category

Installed WordPress-5.3-RU_EN based on Apache2 server.

But I can not remove this page.

read two answers, on a roughly similar question. here and here

At first I did not understand what was happening, after I understood it was already late; _; , no less than a week passed after installation and I even forgot where the installed files are installed (with which the machine works).
And also where the main page of the WordPress is, I also do not know.

Apache When installing, creates a folder / var / www / html and creates an index.html file there.

In the NGINX settings you have a default config looks where:

root / var / www / html;

add index.php to the list if you are using php index index.html index.htm index.nginx-debian.html;

Change the Root / Var / www / html path; on the one you want or
Replace the contents of the /Var/www/html/index.html

How to find out where the main page of the WordPress is lies ??


Answer 1, Authority 100%

Configure in Apache Priorities DirectoryIndex

directoryindex index.php, index.html

Answer 2

In general, it was necessary to call the command

sudo nano /etc/apache2/mods-enabled/dir.conf

and replace the string

directoryindex index.php index.html index.cgi index.pl index.xhtml index.htm

on

directoryindex index.php index.html

Now the entire contents of the dir.conf file looks like this:

& lt; ifmodule mod_dir.c & gt;
  DirectoryIndex index.php index.html
& lt; / iFModule & gt;
# VIM: Syntax = Apache TS = 4 SW = 4 STS = 4 SR NOET

After saving the file, you must overload the server:

sudo systemctl Restart Apache2

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions