title: Static webpage on Nginx Docker Container Missing CSS
body: <p>I am trying to host the Swagger UI on a docker container using Nginx.</p>
  
  <p>When I access my webpage via <a href="http://hostAddress.com/swagger" rel="nofollow">hostAddress.com</a> it returns the webpage as plain text and inspecting it tells me that it can't find any of the javascript or css files despite them seeming to be present in the container as I have ssh into the container to check.</p>
  
  <p>My dockerfile</p>
  
  <pre><code>FROM nginx
  COPY src /usr/share/nginx/html
  COPY config/nginx.conf /etc/nginx
  EXPOSE 80
  </code></pre>
  
  <p>nginx.config</p>
  
  <pre><code>events {
    worker_connections  4096;  ## Default: 1024
  }
  
  http {
    server {
  listen       80;
  server_name  localhost;
  root   /usr/share/nginx/html;
  index  index.html index.htm;
  include /etc/nginx/mime.types;
  
  
    location /swagger {
    try_files $uri /index.html;
  }
  
  #Static File Caching. All static files with the following extension will be cached for 1 day
  location ~* .(jpg|jpeg|png|gif|ico|css|js)$ {
    expires 1d;
      }
    }
  }
  </code></pre>