# Problem configuring tusd over https on Nginx

**URL:** <https://community.transloadit.com/t/problem-configuring-tusd-over-https-on-nginx/15176>\
**Category:** Uppy\
**Created:** [December 30, 2019, 2:47pm UTC](https://community.transloadit.com/t/problem-configuring-tusd-over-https-on-nginx/15176 "2019-12-30T14:47:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vhpepz](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/vhpepz/32/163_2.png) [@vhpepz](https://community.transloadit.com/u/vhpepz)\
**Post date:** [December 30, 2019, 2:47pm UTC](https://community.transloadit.com/t/problem-configuring-tusd-over-https-on-nginx/15176/1 "2019-12-30T14:47:51Z")

</div>

I am trying to setup tusd with Uppy on https without success. It works well on http.

Here’s my ngynx conf file:

```
server {
  listen 80;
  listen[::]: 80;
  server_name
  DOMAIN.com
  www.DOMAIN.com;

  root / srv / users / DOMAIN / apps / DOMAIN / public;

  access_log / srv / users / DOMAIN / log / DOMAIN / DOMAIN_nginx.access.log main;
  error_log / srv / users / DOMAIN / log / DOMAIN / DOMAIN_nginx.error.log;

  proxy_set_header Host $host;
  proxy_set_header X - Real - IP $remote_addr;
  proxy_set_header X - Forwarded - For $proxy_add_x_forwarded_for;

  include / etc / nginx - sp / vhosts.d / DOMAIN.d
  /*.nonssl_conf;
      include /etc/nginx-sp/vhosts.d/DOMAIN.d/*.conf;
  }

  server {
      listen 443 ssl http2;
      listen [::]:443 ssl http2;
      server_name
          DOMAIN.com
          www.DOMAIN.com
        ;

      ssl_certificate_key ssl/DOMAIN.key;
      ssl_certificate ssl/DOMAIN.combined_crt;

      root /srv/users/DOMAIN/apps/DOMAIN/public;

      access_log /srv/users/DOMAIN/log/DOMAIN/DOMAIN_nginx.access_ssl.log main;
      error_log /srv/users/DOMAIN/log/DOMAIN/DOMAIN_nginx.error_ssl.log;

      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Forwarded-SSL on;
      proxy_set_header X-Forwarded-Proto $scheme;

      include /etc/nginx-sp/vhosts.d/DOMAIN.d/*.ssl_conf;
      include /etc/nginx-sp/vhosts.d/DOMAIN.d/*.conf;

  location /files/ {
        #resolver 8.8.8.8 4.2.2.2;
        
        proxy_pass http://localhost:3020/files;   
        proxy_set_header Host $host; 
        proxy_set_header X-Real-IP $remote_addr;    

        # Disable request and response buffering    
        proxy_request_buffering off;               
        proxy_buffering off;                
        proxy_http_version 1.1;                 
        
        # Add X-Forwarded-* headers so that response can reference https and
        # originating host:port                                                     
        proxy_set_header X-Forwarded-Host $hostname;                       
        proxy_set_header X-Forwarded-Proto $scheme;                                
        proxy_set_header X-Forwarded-Proto https;      
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;            
        
        # Allow proxying of websockets if required               
        proxy_set_header Upgrade $http_upgrade;         
        proxy_set_header Connection "upgrade";        
        client_max_body_size 0;  
    }
  }

```

At another conf file I have this additional configuration:

```
location / {
    proxy_pass $backend_protocol://$backend_host:$backend_port;
}

```

At Chrome console I have the following output:

```
upload.js:2 OPTIONS https://DOMAIN/files/2b775a112504ed1222c6ffdd4fbdac03+Dc99JI0Zvgh54FXVfpp5K32GAiZBjV5bY-d9tzj8fDL1FxNKKZrHP_SBE6OERG8SWAm1ZjqtjYMVWSvWCQLba0qsR8krfVBYw8ApHqIBO7DG9Bn1t_tv_a6nuuTuqlXC net::ERR_NAME_NOT_RESOLVED

```

Notice the domain without the .com extension!

I tried all combinations of configuration, commenting the configuration lines without success. Can you spot the mistake?

---

<div class="post-metadata">

**Author:** ![ajkachnic](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.transloadit.com/ajkachnic/32/260_2.png) [@ajkachnic](https://community.transloadit.com/u/ajkachnic)\
**Post date:** [July 28, 2020, 4:21pm UTC](https://community.transloadit.com/t/problem-configuring-tusd-over-https-on-nginx/15176/2 "2020-07-28T16:21:27Z")

</div>

Hey there. I believe that there is an open GitHub issue that is referring to a similar issue (specifically, https not working)

I don’t know nginx well enough to spot an error in the config, so I think the best that I can do is to link to the issue

> <https://github.com/transloadit/uppy/issues/2157>
>
> Hi,
> File upload process not showing.
> Everything works well. But while the file does not load shows 0 and how to complete the...

  
This appears to mirror your problems

Hopefully this can get fixed soon. Good luck  
- Andrew
