Skip to content

Instantly share code, notes, and snippets.

View joelmasters's full-sized avatar

Joel Masters joelmasters

View GitHub Profile
@joelmasters
joelmasters / next_nginx.md
Last active November 1, 2023 20:30 — forked from kocisov/next_nginx.md
How to setup next.js app on nginx with letsencrypt

How to setup next.js app on nginx with letsencrypt/getssl

next.js, nginx, reverse-proxy, ssl

Next.js package setup

Your server.js file should look like the following. Make sure you're serving static files!

const { createServer } = require('http');
const { parse } = require('url');
const next = require('next');