<p>So I added the following lines to my nginx file and it all worked</p>

<pre><code>location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
    try_files $uri /index.php?$query_string;
}

location ~* \.(?:css|js)$ {
    try_files $uri /index.php?$query_string;
}
</code></pre>

CC BY-SA 3.0
2014-09-24T18:46:45.097Z
2014-09-24T18:46:45.097Z
user814584
<p>I switched my craft install to be completely served over SSL. The front end continued working fine, but the backend is 404'ing all static assets. I assume this is because the http was handling the /admin/resources/ rule fine but not the https. I'm using NGINX but am using the exact same config that I was before, just adding in my SSL Certificate keys. Any thoughts on config settings to look at or lines of code to investigate?</p>

<nginx>
Admin assets not being served over https
# Admin assets not being served over https

(Asked by: username_0 on 2014-09-24)

I switched my craft install to be completely served over SSL. The front end continued working fine, but the backend is 404'ing all static assets. I assume this is because the http was handling the /admin/resources/ rule fine but not the https. I'm using NGINX but am using the exact same config that I was before, just adding in my SSL Certificate keys. Any thoughts on config settings to look at or lines of code to investigate?

**Tags:** nginx

---

## 1 answers

### Answer by username_0 on 2014-09-24. Score: 3

So I added the following lines to my nginx file and it all worked
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
    try_files $uri /index.php?$query_string;
}

location ~* \.(?:css|js)$ {
    try_files $uri /index.php?$query_string;
}


---

