server { listen 80 default_server; listen [::]:80 default_server; root /var/www/html; index index.html; server_name _; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ =404; add_header Content-Type 'text/html;'; autoindex on; } location ~ \.sh$ { proxy_pass http://127.0.0.1:5000; } }