Build a website

The following steps would guide you on building a website
- Setup a server for your website
- Go to oracle.com. Click the view account on the top right corner and select register an account
- Type in the necessary information to register.
- Login to your account. Setup duo authentication if necessary
- click the symbol on the top left, select compute, and select instance
- click on Edit for image and shape, change the image to “Ubuntu 24.04”, the shape to
- scroll down to the part where it says add ssh-key. save both public and private key
- scroll down to the bottom of the page and click create instance. You should be guided to the page where it says provisioning. Wait until it says running. This means your server has been set up
- Setup connection between your computer and your server
- download and install VSCode depending on your system
- install the SSH plugin in vscode. You should see three of them
- click on the search bar, type >ssh, click on connect to host, and then click configure ssh, then click the first one on the list
- copy the following code to the file. Replace “your_ip” and “your_key” part with your instance’s public ip and ssh key
1
2
3
4Host your_ip
HostName your_ip
User ubuntu
IdentityFile ~/Downloads/your_key - click on the search bar again, click on connect to host, then click the one with your ip address
- wait until the setup is complete. When the connection is set it would ask you which operating system you are using. Click on Linux.
- setup your server
- click on the triple dots on the top left and select terminal -> new terminal.
- paste the following code into your terminal line by line
1
2
3
4
5
6
7
8
9sudo apt update && sudo apt upgrade -y
sudo apt install apache2 -y
sudo systemctl start apache2
sudo systemctl enable apache2
sudo apt install ufw -y
sudo ufw allow OpenSSH
sudo ufw allow 'Apache'
sudo ufw enable
sudo reboot - go to your oracle compute instance and click on the subnet
- click on the default security list
- click on the add ingress rule, and type in 0.0.0.0 for the CIDR field. Select all protocol in the IP protocol field
- copy and paste your ip address to a new page. If it is not showing up, wait a few minutes before trying again. If everything works, you should be able to see a sample page in your server. This means all setup so far are correct.
- Title: Build a website
- Author: Zhiyuan Xu
- Created at : 2025-03-25 09:02:35
- Updated at : 2025-03-25 22:24:25
- Link: https://redefine.ohevan.com/Build-a-website/
- License: This work is licensed under CC BY-NC-SA 4.0.
Comments