Aky*_*lle 4 httpd selinux centos documentroot apache-2.2
我阅读了以前的所有答案,但我无法解决我的问题.. 我正在更改托管网站的服务器,并再次设置 apache.. 现在,在安装 php、fail2ban 等之后,我遇到了这个问题:
service httpd start
Avvio di httpd: Syntax error on line 292 of /etc/httpd/conf/httpd.conf: DocumentRoot must be a directory
[FALLITO]
Run Code Online (Sandbox Code Playgroud)
我已经禁用了 selinux 并重新启动了,但什么也没发生..
sestatus
SELinux status: disabled
Run Code Online (Sandbox Code Playgroud)
在其他答案中,我阅读了该帖子..但我不知道它是什么,但我看到它与我看到的其他非常不同..
ls -laZ /var/www/html/
drwxr-xr-x root root ? .
drwxr-xr-x root root ? ..
drwxr-xr-x root root ? form
Run Code Online (Sandbox Code Playgroud)
显然我的 httpd.conf 有
DocumentRoot "/var/www/html”
Run Code Online (Sandbox Code Playgroud)
我需要的根是
DocumentRoot "/var/www/html/form”
Run Code Online (Sandbox Code Playgroud)
现在使用默认根目录不起作用,但在编辑某些文件(我不记得是哪个)之前,它正确启动。我希望你能帮助我.. 我使用的是 cents 6.5 x64.. 非常感谢
安德烈亚
正如 ETL 所提到的,您的问题几乎肯定是引号字符DocumentRoot "/var/www/html/form”
- 您需要使用DocumentRoot "/var/www/html/form"
(或只是DocumentRoot /var/www/html/form
,它工作正常。)。
不要在文本编辑器中编辑这样的配置文件替换""
用“”
或--
用—
,特别是MS Word和写字板。
归档时间: |
|
查看次数: |
17768 次 |
最近记录: |