Dashes not allowed in virtual host entry?
Strange error. Was trying to figure out why a virtual host was not working using a setup I've used a hundred times.
DocumentRoot "/var/htdocs/directory-name/"
<Directory "/var/htdocs/directory-name/">
Gave me a 403 error no matter what I tried
DocumentRoot "/var/htdocs/directoryname/"
<Directory "/var/htdocs/directoryname/">
Did not. Has anyone else ever experienced this? I didn'开发者_运维知识库t paste the entire virtual host entry, but this was the only difference between what worked and what gave me a 403. I'm totally bewildered.
This should work if you have a physical folder "directory-name" at "/var/htdocs". Could be some unrelated problem otherwise.
Perhaps you forgot to add an entry like
127.0.0.1 test.directory-name.com
in C:\Windows\System32\drivers\etc\hosts
? (if using a test environment on Windows)
Also, double-check any .htaccess
files you have for unwanted Rewrites / redirects
精彩评论