Ubuntu Apache Webserver: Difference between revisions
No edit summary |
No edit summary |
||
Line 54: | Line 54: | ||
Follow directions here: [https://help.ubuntu.com/community/PureFTP https://help.ubuntu.com/community/PureFTP] | Follow directions here: [https://help.ubuntu.com/community/PureFTP https://help.ubuntu.com/community/PureFTP] | ||
<iframe src="http://etherpad.hackersanddesigners.nl/" width=100% height=300px></iframe> |
Revision as of 15:33, 2 July 2016
Installing Apache Webserver on Ubuntu
Step 1 : SSH to your instance
you@laptop:~$ ssh root@213.108.110.46
Step 2 : Update package manager
root@jbg:~# apt-get update
Step 3 : Install Apache Webserver
root@jbg:~# apt-get install apache2
Step 4 : 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 5 : 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!
Step 6 : Copying files
scp
I recommend using the scp
command for copying files, or perhaps your file transfer application (CyberDuck, etc.) of preference also supports scp. File can be moved from your computer to the VPS via the terminal as well. It's a bit like ftp
, but encrypted and secure.
Example 1: Copy a new single index.html to the webserver.
you@laptop:~$ scp index.html root@213.108.110.46:/var/www/html
Example 2: Copy an entire directory, files, and sub-directories to the webserver.
you@laptop:~$ scp -r * root@213.108.110.46:/var/www/html
ftp
root@handd:~# apt-get install software-properties-common
root@handd:~# add-apt-repository universe
root@handd:~# apt-get update
Follow directions here: https://help.ubuntu.com/community/PureFTP
<iframe src="http://etherpad.hackersanddesigners.nl/" width=100% height=300px></iframe>