# How to configure without extension on nginx

**URL:** <https://www.ruby-forum.com/t/how-to-configure-without-extension-on-nginx/200941>\
**Category:** NGINX\
**Created:** [December 25, 2010, 6:01pm UTC](https://www.ruby-forum.com/t/how-to-configure-without-extension-on-nginx/200941 "2010-12-25T18:01:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikuSESS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f17d59/32.png) [@nikuSESS](https://www.ruby-forum.com/u/nikuSESS)\
**Post date:** [December 25, 2010, 6:01pm UTC](https://www.ruby-forum.com/t/how-to-configure-without-extension-on-nginx/200941/1 "2010-12-25T18:01:34Z")

</div>

Hi, I want to set [http://abc.com/test](http://abc.com/test) can be viewed, not downloaded.  
how to configure mime.type.conf or nginx.conf file. Thank you!

Posted at Nginx Forum:

> **[How to configure without extension on nginx](https://forum.nginx.org/read.php?2,161032,161032#msg-161032)**
>
> Hi, I want to set http://abc.com/test can be viewed, not downloaded. how to configure mime.type.conf or nginx.conf file. Thank you!

---

<div class="post-metadata">

**Author:** ![letgohome](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/71e660/32.png) [@letgohome](https://www.ruby-forum.com/u/letgohome)\
**Post date:** [December 25, 2010, 6:29pm UTC](https://www.ruby-forum.com/t/how-to-configure-without-extension-on-nginx/200941/2 "2010-12-25T18:29:45Z")

</div>

Hello!

On Sat, Dec 25, 2010 at 11:59:52AM -0500, letgohome wrote:

> Hi, I want to set [http://abc.com/test](http://abc.com/test) can be viewed, not downloaded.  
> how to configure mime.type.conf or nginx.conf file. Thank you!

location = /test {  
types {}  
default\_type text/html;  
}

> **[GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki...](https://github.com/nginxinc/nginx-wiki)**
>
> ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com

> **[GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki...](https://github.com/nginxinc/nginx-wiki)**
>
> ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com

Maxim D.

---

<div class="post-metadata">

**Author:** ![letgohome](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/71e660/32.png) [@letgohome](https://www.ruby-forum.com/u/letgohome)\
**Post date:** [December 26, 2010, 4:42am UTC](https://www.ruby-forum.com/t/how-to-configure-without-extension-on-nginx/200941/3 "2010-12-26T04:42:04Z")

</div>

I try it, but unsuccessful,

```auto
    server {
        listen 80;
        server_name localhost;
        root /www/linux;
        index index.html index.php index.htm;

        location = /test {
           types {}
           default_type text/html;
        }

        location ~ \.php$ {
           # fastcgi_pass unix:/tmp/php-cgi.sock;
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
            include fcgi.conf;
        }
    }
```

Posted at Nginx Forum:

> **[Re: How to configure without extension on nginx](https://forum.nginx.org/read.php?2,161032,161117#msg-161117)**
>
> Hi, I want to set http://abc.com/test can be viewed, not downloaded. how to configure mime.type.conf or nginx.conf file. Thank you!

---

<div class="post-metadata">

**Author:** ![letgohome](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/71e660/32.png) [@letgohome](https://www.ruby-forum.com/u/letgohome)\
**Post date:** [December 26, 2010, 8:43pm UTC](https://www.ruby-forum.com/t/how-to-configure-without-extension-on-nginx/200941/4 "2010-12-26T20:43:14Z")

</div>

On Sat, Dec 25, 2010 at 10:40:16PM -0500, letgohome wrote:

> ```
> types {}
> 
> ```
> 
> [/code]  
> Probably browser has already cache the response.  
> Try another browser or try to rename location:

```
    location = /test1 {
        alias /www/linux/text;
        ...

```

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**

---

<div class="post-metadata">

**Author:** ![letgohome](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/71e660/32.png) [@letgohome](https://www.ruby-forum.com/u/letgohome)\
**Post date:** [December 27, 2010, 3:07pm UTC](https://www.ruby-forum.com/t/how-to-configure-without-extension-on-nginx/200941/5 "2010-12-27T15:07:51Z")

</div>

IE is successful , the test file is download with chrome, why?

Posted at Nginx Forum:

> **[Re: How to configure without extension on nginx](https://forum.nginx.org/read.php?2,161032,161427#msg-161427)**
>
> Hi, I want to set http://abc.com/test can be viewed, not downloaded. how to configure mime.type.conf or nginx.conf file. Thank you!
