# Nginx configuration for discourse

**URL:** https://meta.discourse.org/t/nginx-configuration-for-discourse/59962
**Category:** Self-hosting
**Created:** [3월 27, 2017, 12:53오후 UTC](https://meta.discourse.org/t/nginx-configuration-for-discourse/59962 "2017-03-27T12:53:05Z")
**Posts on this page:** 1
**Showing post:** 12

<div class="post-metadata">

### Author: ![terraboss](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/terraboss/32/381157_2.png) [@terraboss](https://meta.discourse.org/u/terraboss)
#### Post date: [1월 22, 2018, 1:08오전 UTC](https://meta.discourse.org/t/nginx-configuration-for-discourse/59962/12 "2018-01-22T01:08:10Z")

</div>

Hello guys,

can someone help me to solve [this old “issue”](https://meta.discourse.org/t/howto-open-pdf-files-in-same-browser-window/25823), by explaining me where I can find and edit the nginx config? I found some snippet, that could help me:

[https://stackoverflow.com/a/31321716](https://stackoverflow.com/a/31321716)

> I added to my mime.types file:
> 
> ` audio/x-wav wav;`
> 
> In my nginx config:
> 
> ```
> location ~ \.wav$ {
> add_header Content-Disposition "inline";
> }
> 
> ```

It would be nice to view the pdf file inside browser window itself. I guess, it must look like this …

` application/pdf pdf;`

```
location ~ \.pdf$ {
  add_header Content-Disposition "inline";
}

```

What would be the most elegant way to realise this?

Thanks in advance!

---

_[View the full topic](https://meta.discourse.org/t/nginx-configuration-for-discourse/59962)._
