Для примера example.com хостится на 3.3.3.3
DNS management for example.com
A record* 3.3.3.3
sudo apt install nginx
cd /etc/nginx/sites-available/
touch site.conf
ln -s ../sites-available/site.conf .
site.conf
server {
server_name wiki.example.com;
listen 80;
listen [::]:80;
root /var/www/public_html;
location / {
proxy_pass http://1.2.3.4:8080/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Далее необходимо настроить Certbot