YT05‐Set up Nginx Domain - zhamri/CSC584-Enterprise_Programming GitHub Wiki

1. Install Nginx

sudo apt install nginx -y
sudo systemctl enable nginx
sudo systemctl start nginx

2. Configure reverse proxy

vim /etc/nginx/sites-available/csc584

Paste:

server {
    server_name csc584.yourdomain.com;

    location / {
        proxy_pass http://localhost:6060;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}

3. Enable config

ln -s /etc/nginx/sites-available/csc584 /etc/nginx/sites-enabled/
nginx -t
systemctl restart nginx

4. Point domain (DNS)

A record → csc584.yourdomain.com → your-server-ip