Linux httpd.service的sudo apachectl重新启动作业失败。见';systemctl状态httpd.service';和';journalctl-xn';详情

Linux httpd.service的sudo apachectl重新启动作业失败。见';systemctl状态httpd.service';和';journalctl-xn';详情,linux,apache,httpd.conf,centos7,Linux,Apache,Httpd.conf,Centos7,在我的问题变得支离破碎之前,我已经检查了SELinux是否被禁用,它是否被禁用,sudo apachectl restart不工作 我遇到了一个问题让我先说我是一个noob,当我运行sudo apachectl restart时,它给了我一个错误: "Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details." 当我运行journalctl-xn时,它

在我的问题变得支离破碎之前,我已经检查了SELinux是否被禁用,它是否被禁用,
sudo apachectl restart
不工作

我遇到了一个问题让我先说我是一个noob,当我运行
sudo apachectl restart
时,它给了我一个错误:

"Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details." 
当我运行journalctl-xn时,它指出

"no files were found" 
当我运行sudo systemctl status httpd.service时,我收到:

"httpd.service - The Apache HTTP Server    Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled)    Active: failed (Result: exit-code) since Tue 2015-05-19 07:24:29 SGT; 1min 27s ago   Process: 12590 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)   Process: 12589 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)  Main PID: 12589 (code=exited, status=1/FAILURE) May 19 07:24:29 synapticenhancements httpd[12589]: AH00526: Syntax error on line 119 of /etc/httpd/conf/h...onf: May 19 07:24:29 synapticenhancements httpd[12589]: DocumentRoot must be a directory May 19 07:24:29 synapticenhancements systemd[1]: httpd.service: main process exited, code=exited, status=...LURE May 19 07:24:29 synapticenhancements kill[12590]: kill: cannot find process "" May 19 07:24:29 synapticenhancements systemd[1]: httpd.service: control process exited, code=exited status=1 May 19 07:24:29 synapticenhancements systemd[1]: Failed to start The Apache HTTP Server. May 19 07:24:29 synapticenhancements systemd[1]: Unit httpd.service entered failed state. Hint: Some lines were ellipsized, use -l to show in full.
有什么想法吗


#DocumentRoot:您将从中为您的用户提供服务的目录
#文件。默认情况下,所有请求都来自此目录,但
#符号链接和别名可用于指向其他位置。
#
DocumentRoot“/he/sites”
#
#放宽对/var/www内内容的访问。
#
不允许超限
#允许开放访问:
要求所有授权
#进一步放宽对默认文档根目录的访问:
#directoryIndex:设置Apache在目录
#请求。

它说文档根有一个错误我不知道问题是什么。。。有什么帮助吗?

它已经告诉您错误的确切位置。您对配置文件进行了更改,该文件无效或输入错误。它甚至告诉你它是什么行号

httpd[12589]:AH00526:的第119行出现语法错误 /etc/httpd/conf/h…onf:May 19 07:24:29 Synaptic httpd[12589]:DocumentRoot必须是目录May 19 07:24:29

如果您使用
VIM
编辑文件,您可以执行
:set number
查看行号以查找错误

已解决: 显然,我把我的文件结构放错了部分,所以我基本上引用了一些不存在的东西。我将文件结构移动到根目录,一切正常

# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/he/sites"

#
# Relax access to content within /var/www.
#
<Directory "/he/sites">
    AllowOverride None
    # Allow open access:
    Require all granted
</Directory>

# Further relax access to the default document root:
#directoryIndex: sets the file that Apache will serve if a directory
# is requested.