Answer the question
In order to leave comments, you need to log in
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/html
although 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
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 questionAsk a Question
731 491 924 answers to any question