Add the following code snippet to the end of the file:
[html]
comment = HTML Directory
path = /var/www/html
browseable = yes
read only = no
guest ok = no
create mask = 0777
directory mask = 0777
valid users = samba_user
Save and exit by pressing CTRL+O, Enter, and then CTRL+X.
Execute the following command:
sudo systemctl restart smbd
You should now be able to go to your files on your computer by writing: \\your_ubuntu_server_ip\html.
Connect
with the user "samba_user" and the password you set earlier.
5. Make your website publicly accessible
You have to port forward the ip address of your server and it's port 80 and 443.
Now, your Ubuntu server is configured to use No-IP DDNS. The No-IP DUC will automatically update your
hostname with the current dynamic IP address. You can access your server using the No-IP hostname you
created earlier.
6. Make Your Website Secure
Secure your website with Certbot.
Install snapd with the following command:
sudo apt install snapd
Install Certbot:
sudo snap install --classic certbot
Create a symbolic link for Certbot:
sudo ln -s /snap/bin/certbot /usr/bin/certbot
Get a certificate and edit your Apache configuration for HTTPS:
sudo certbot --apache
Test automatic renewal:
sudo certbot renew --dry-run
7. Customize Webpages
Modify your HTML, CSS, and Javascript files using the Samba share. The changes will be displayed on your
webserver!