M
M
MrChen2016-11-06 04:08:05
Apache HTTP Server
MrChen, 2016-11-06 04:08:05

Why doesn't it load a file from a given lamp ubuntu directory?

Hello! I have a local Lamp server on my computer. I made a virtual host, as shown in the guide. The host seems to be working, but for some reason it loads index.html from /var/www/htmlalthough another is specified in the DocumentRoot config ...
Here is the Host Config:

<VirtualHost *:80>
    ServerName sitename.ru
    DocumentRoot /var/www/sitename.ru/public
    <Directory /var/www/sitename.ru>
        AllowOverride All
    </Directory>
</VirtualHost>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2016-11-06
@slo_nik

Goodnight.
Have you created your config file and included your host?
That is, you need to disable the old configuration file, which just shows you index.html from /var/www/html and include your configuration file.
This is mentioned in the manual.
ps Configuration files in /etc/apache2/sites-available, connected sites in /etc/apache2/sites-enabled
pss After you have connected your configuration, reboot the server with the command
, or completely reboot the computer, if not laziness.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question