K
K
Kamil2020-07-29 13:03:31
Apache HTTP Server
Kamil, 2020-07-29 13:03:31

Apache2 does not see the directory from the config, why?

For some reason, Apache does not see the directory with the site files.
I create a config in the sites-enabled directory. I write
the path like this:

<VirtualHost *:80>
  ServerName domain.com
  ServerAlias www.domain.com

  ServerAdmin [email protected]
  DocumentRoot /var/www/html/domain.com/bases
  #RemoteIPHeader X-Forwarded-For

  <Directory /var/www/html/domain.com/bases>
    Options Includes Indexes FollowSymLinks
    AllowOverride All
    Require all granted
    </Directory>

With this configuration, it should look for php and other files in the bases directory , but it opens the previous
domain.com directory and looks for files there. Why? I after all specify to it from what directory to take files.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikita Shinkevich, 2020-07-29
@domres

...weird. Should work in theory. Have you tried adding quotes in the path?

K
Kamil, 2020-07-30
@Lakika

The problem was that my hostname was the name of the domain.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question