server {
listen 80;
server_name домен_который_нужно_проксировать;
location / {
proxy_pass http://namesite.domen/username;
proxy_set_header Host namesite.domen;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
}