[GH-ISSUE #2377] Seems to break Next-Auth however this works - can I do it in your software #1678

Closed
opened 2026-02-26 07:32:00 +03:00 by kerem · 2 comments
Owner

Originally created by @redimongo on GitHub (Nov 7, 2022).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2377

I am wondering how can I do the following using your software

server {
  listen 80 default_server;

  server_name DOMAIN.com.au;

  server_tokens off;

  client_body_buffer_size 300m;
  client_max_body_size    300m;

  gzip on;
  gzip_proxied any;
  gzip_comp_level 4;
  gzip_types text/css application/javascript image/svg+xml;

  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection 'upgrade';
  proxy_set_header Host $host;
  proxy_cache_bypass $http_upgrade;

  # BUILT ASSETS (E.G. JS BUNDLES)
  # Browser cache - max cache headers from Next.js as build id in url
  # Server cache - valid forever (cleared after cache "inactive" period)
  location /_next {
    proxy_cache STATIC;
    proxy_pass http://nextjs;
  }

  location /.well-known/acme-challenge/ {
        root /var/www/certbot;
  }

  location /.well-known/ {
        return 301 https://$host$request_uri;
  }
  # STATIC ASSETS (E.G. IMAGES)
  # Browser cache - "no-cache" headers from Next.js as no build id in url
  # Server cache - refresh regularly in case of changes
  location /static {
    proxy_cache STATIC;
    proxy_ignore_headers Cache-Control;
    proxy_cache_valid 60m;
    proxy_pass http://nextjs;
  }

  # DYNAMIC ASSETS - NO CACHE
  location / {
    proxy_pass http://nextjs;
  }
}
Originally created by @redimongo on GitHub (Nov 7, 2022). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2377 I am wondering how can I do the following using your software ``` server { listen 80 default_server; server_name DOMAIN.com.au; server_tokens off; client_body_buffer_size 300m; client_max_body_size 300m; gzip on; gzip_proxied any; gzip_comp_level 4; gzip_types text/css application/javascript image/svg+xml; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; # BUILT ASSETS (E.G. JS BUNDLES) # Browser cache - max cache headers from Next.js as build id in url # Server cache - valid forever (cleared after cache "inactive" period) location /_next { proxy_cache STATIC; proxy_pass http://nextjs; } location /.well-known/acme-challenge/ { root /var/www/certbot; } location /.well-known/ { return 301 https://$host$request_uri; } # STATIC ASSETS (E.G. IMAGES) # Browser cache - "no-cache" headers from Next.js as no build id in url # Server cache - refresh regularly in case of changes location /static { proxy_cache STATIC; proxy_ignore_headers Cache-Control; proxy_cache_valid 60m; proxy_pass http://nextjs; } # DYNAMIC ASSETS - NO CACHE location / { proxy_pass http://nextjs; } } ```
kerem 2026-02-26 07:32:00 +03:00
  • closed this issue
  • added the
    stale
    label
Author
Owner

@github-actions[bot] commented on GitHub (Feb 5, 2024):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:1926078970 --> @github-actions[bot] commented on GitHub (Feb 5, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@github-actions[bot] commented on GitHub (Mar 22, 2025):

Issue was closed due to inactivity.

<!-- gh-comment-id:2744893314 --> @github-actions[bot] commented on GitHub (Mar 22, 2025): Issue was closed due to inactivity.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#1678
No description provided.