Dash not allowed in virtual host entry?

A strange mistake. I tried to find out why the virtual host was not working using the setting that I used a hundred times.

    DocumentRoot "/var/htdocs/directory-name/"
    <Directory "/var/htdocs/directory-name/">

Gave me 403 error no matter what I tried

    DocumentRoot "/var/htdocs/directoryname/"
    <Directory "/var/htdocs/directoryname/">

No. Has anyone else ever experienced this? I didn’t insert the whole virtual host entry, but that was the only difference between what worked and what gave me 403. I am completely confused.

+3
source share
2 answers

This should work if you have a physical directory "directory-name" in "/ var / htdocs". Otherwise, there may be some kind of unrelated problem.

+1
source

You may have forgotten to add a post, for example

127.0.0.1        test.directory-name.com

C:\Windows\System32\drivers\etc\hosts? ( Windows)

, .htaccess, /

0

Source: https://habr.com/ru/post/1789277/


All Articles