Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to edit httpd.conf file in AMAZON EC2

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?

like image 437
Sumit Bijvani Avatar asked Feb 27 '13 12:02

Sumit Bijvani


People also ask

How do I edit httpd conf on AWS?

1 Answer. Edit the file and to save the edits use ctrl+o and press enter. After editing your httpd. conf file, restart your httpd service, for the changes to take effect.

How do I edit an EC2 file?

Originally Answered: How can I edit a file on EC2 directly from my localhost? On your local-machine, you can mount the EC2 directory using sshfs (or even NFS if you are ready to setup the exports) and edit the required file.


2 Answers

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.

like image 132
Syed Priom Avatar answered Sep 28 '22 23:09

Syed Priom


I have found solution and its working...

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

like image 42
Sumit Bijvani Avatar answered Sep 28 '22 23:09

Sumit Bijvani