title: Nginx subdomain - Home Assistant
body: <p>I have a Home Assistant instance running on the same server like my nginx proxy, now I would like to create a subdomain under my public domain. In order to make my Home Assistant instance under the following url available <a href="https://something.com/homeassistant" rel="nofollow noreferrer">https://something.com/homeassistant</a>. I'm currently using this code on the nginx proxy:</p>
  
  <pre><code>location / {
      proxy_pass http://localhost:8080/;
      proxy_set_header Host $host;
  
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";
  }
  </code></pre>
  
  <p>I've already tried with:</p>
  
  <pre><code>location /homeassistant {
      proxy_pass http://localhost:8080/;
      proxy_set_header Host $host;
  
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";
  }
  </code></pre>
  
  <p>But this is not working at all..</p>
  
  <p>I also used this guide here: <a href="https://home-assistant.io/docs/ecosystem/nginx_subdomain/" rel="nofollow noreferrer">https://home-assistant.io/docs/ecosystem/nginx_subdomain/</a></p>
  
  <p>How can I configure nginx to serve like described above?</p>