How to edit httpd.conf file in AMAZON EC2

不问归期 提交于 2019-12-28 09:39:26

问题


I am new on AMAZON EC2 Server, recently I have Installed PHP and MySQL and now I want to update file /etc/httpd/conf/httpd.conf

but the problem is, when I am going to update it, it display error like - Permission denied. What is the best way to update it?


回答1:


You have to change the file as root user. Do this:

sudo nano /etc/httpd/conf/httpd.conf

Make your changes and save with ctrl + O, Enter. Done.




回答2:


I have found solution and its working...

$ sudo nano /etc/httpd/conf/httpd.conf




回答3:


It would be prompting you a alert, that you can duplicate it. So

  • So duplicate it, store it on desktop with same name
  • Edit it for your use(remove comment '#')
  • Save it
  • Now replace the original file with this one
  • it'll prompt for your password, provide that

Now all updates you did are saved in httpd.conf Cheers



来源:https://stackoverflow.com/questions/15112424/how-to-edit-httpd-conf-file-in-amazon-ec2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!