upload HTML files
with SCP
to Apache server
on Ubuntu Linux

First, navigate to the web root of Apache, which is /var/www.

cd /var/www

Then give yourself permissions to make changes.

sudo chown -R $USER:$USER /var/www

Delete the default Apache html folder.

rm -rf html

Leave the ssh connection.

exit

Navigate to the location of the html files for the website in the terminal.

cd PROJECT/

Now that ssh keys are set up, you can also use scp to securely copy files to the server. If you don't have any html for a website, ask ChatGPT to write something for you. Use the -i option to specify the key file, and the -r option to recursively copy multiple files or entire folders.

scp -i ~/.ssh/_____ -r anarchitecture.io __.__.__.__:/var/www/.

NEXT =
virtual host →