Install apache:
$ sudo apt install apache2
It’s running!
razzi@lima-default:~$ curl -I localhost
HTTP/1.1 200 OK
Date: Fri, 03 Jan 2025 23:20:52 GMT
Server: Apache/2.4.58 (Ubuntu)
Opening http://localhost will show the iconic “it works” page:
That kinda gives you instructions. Namely you want to to replace the file at /var/www/html/index.html
. Here’s how I back it up to my home directory in case I want to look at it later:
$ mkdir tmp
$ sudo mv /var/www/html/index.html tmp/
However you’ll notice I had to use sudo
to do that. In fact the /var/www/html
folder is owned by root
:
razzi@lima-default:~$ ls -lh /var/www/
total 4.0K
drwxr-xr-x 2 root root 4.0K Jan 3 17:37 html
You could edit a file in your home directory and sudo cp
it to /var/www/html
, but I’d prefer to have the changes reflected immediately. (work in progress) Probably easiest to set up a server on a higher port and also not open to the outside internet (/work in progress)