Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (29.3k points)

Please help me to create html file in linux command line i have connected through the Putty and I am unable to create file in /var/www/html/. I have already tries many times through cat and vi command Please help!!!

1 Answer

0 votes
by (50.2k points)

Here you need to open port 80 then only you can create a file and enter data in it. So for opening, you need to install an apache.

For installing Apache in ubuntu:

sudo apt-get update

sudo apt-get install apache2

For installing Apache in Amazon Linux:

sudo yum update

sudo yum install -y httpd

Then you can enter the directory:

cd /var/www/html/

Then create the file using VI editor or nano editor. That will work for you.

For more information, check out this Devops Tutorial.

Related questions

+1 vote
1 answer
asked Sep 26, 2019 in AWS by chandra (29.3k points)

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
0 votes
2 answers

Browse Categories

...