Ubuntu Apache Webserver: Difference between revisions

From Hackers & Designers
(Created page with "= Installing Apache Webserver on Ubuntu = == Step 1 : SSH to your instance == <code>you@laptop:~$ ssh root@213.108.110.46</code> == Step 2 : Install Apache Webserver == <c...")
 
No edit summary
Line 16: Line 16:


<code>root@jbg:~# cd /var/www/html</code>
<code>root@jbg:~# cd /var/www/html</code>
Create a backup of the default page.
<code>root@jbg:~# mv index.html index.html.bkup</code>
<code>root@jbg:~# mv index.html index.html.bkup</code>
<code>root@jbg:~# echo &quot;<h1>Welcome 127.0.0.1!</h1>&quot; > index.html</code>
 
<code>root@jbg:~# echo '&lt;h1&gt;Welcome 127.0.0.1!&lt;/h1&gt;' > index.html</code>


== Refresh! ==
== Refresh! ==

Revision as of 13:17, 10 May 2016

Installing Apache Webserver on Ubuntu

Step 1 : SSH to your instance

you@laptop:~$ ssh root@213.108.110.46

Step 2 : Install Apache Webserver

root@jbg:~# apt-get install apache2

Step 3 : Check the Webserver

Put your instance IP address (ex. 213.108.110.46) into your browser. You should see a page called "Apache2 Ubuntu Default Page".

Step 4 : Create your own homepage

root@jbg:~# cd /var/www/html

Create a backup of the default page.

root@jbg:~# mv index.html index.html.bkup

root@jbg:~# echo '<h1>Welcome 127.0.0.1!</h1>' > index.html

Refresh!