Dec. 26, 2024
'securely' setting up web server with nginx @ home & self hosting
- debian 12 container install inside proxmox
- `sudo apt update && sudo apt upgrade -y
- network settings: If your router supports subnets/VLANs, connect this to the isolated VLAN. within proxmox, assign static IP not in use and point to your router’s gateway.![[Screenshot 2024-07-08 at 8.40.32 PM.png]]
- install nginx on debian -
sudo apt install nginx -y
- create a file for website settings: `nano /etc/nginx/sites-available/mywebsite
server {
listen 80 ;
listen [::]:80 ;
server_name juni-mp4.org ;
root /var/www/juni-web ;
index.html index.htm index.nginx-debian.html ;
location / {
try_files $uri $uri/ =404 ;
}
}
The listen
lines tell nginx
to listen for connections on both IPv4 and IPv6.
The server_name
is the website that we are looking for. By putting landchad.net
here, that means whenever someone connects to this server and is looking for that address, they will be directed to the content in this block. root
specifies the directory we’re going to put our website files in.