Nginx and Certbot set up for accessing your home server applications.
Installing Nginx and then encrypting it’s traffic with Certbot .
Install NginX
apt install nginx
Start NginX
systemctl start nginx
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Edit the Niginx default file
nano /etc/nginx/sites-available/default
server {
listen 80;
listen [::]:80;
server_name (YOURDOMAINNAME);
location / {
proxy_pass http://(IPADDRESSYOUWANTTOACCESS:ANDPORT);
}
}
#
server {
listen 80;
listen [::]:80;
server_name (YOURDOMAINNAME);
location / {
proxy_pass http://(IPADDRESSYOUWANTTOACCESS:ANDPORT);
}
}
#
server {
listen 80;
listen [::]:80;
server_name (SUBDOMAINYOURDOMAINNAME);
location / {
proxy_pass http://(IPADDRESSYOUWANTTOACCESS:ANDPORT);
}
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Restart NginX
systemctl restart nginx.service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Install Cerbot
apt install certbot python3-certbot-nginx
Configure certbot with the domain name
certbot –nginx -d (YOURDOMAINNAME)
Comments are closed.