nginx subdomain not redirecting to desired port
Your subdomain and Main site rule are same.
root /var/www/html;index index.html;
You can solve this problem by making another directory and subdomain conf:
root /var/www/site2/html;index index.html
Make your subdomain conf file looks like:
server { listen 80; server_name admin.example.com; location / { proxy_pass http://127.0.0.1:8080; }}