简体   繁体   English

尝试编辑“ httpd.conf”文件并将其保存回去时出现错误:“ [[写入/etc/httpd/conf/httpd.conf:无此文件或目录]错误”

[英]Error: “[ Error writing /etc/httpd/conf/httpd.conf: No such file or directory ]” while trying to edit “httpd.conf” file and save it back

To avoid click jacking attack for web applications hosted on my locally hosted apache-tomcat web server, I'm trying to edit "httpd.conf" file to append X-options to it. 为了避免对本地托管的apache-tomcat Web服务器上托管的Web应用程序进行点击劫持攻击,我试图编辑“ httpd.conf”文件以将X选项附加到该文件。

Open file with "sudo nano /etc/httpd/conf/httpd.conf" Appending the file with "Header append X-FRAME-OPTIONS "SAMEORIGIN"" Control X Given Y, when it asks me whether to save or not Pressed "return" for confirming the location specified. 使用“ sudo nano /etc/httpd/conf/httpd.conf”打开文件。使用“页眉附加X-FRAME-OPTIONS“ SAMEORIGIN”“附加文件。当询问我是否保存时,给定Y,按Y键。以确认指定的位置。

Gives me an error "[ Error writing /etc/httpd/conf/httpd.conf: No such file or directory ]" 给我一个错误“ [编写/etc/httpd/conf/httpd.conf时出错:没有这样的文件或目录]”

Appreciate any help on this. 感谢对此的任何帮助。

does /etc/httpd/conf/httpd.conf exist? /etc/httpd/conf/httpd.conf是否存在?

if yes please check the permission of it (after change ) that have httpd user permission (owner and permissions) 如果是,请检查具有httpd用户权限(所有者和权限)的权限(更改后)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM