Read Time

0

min

Read Time

0

min

Performance

Sep 9, 2025

Setting Up NGINX Reverse Proxy

Here's a guide on setting up a reverse proxy with NGINX. Safely route requests to your Framer site and selectively proxy specific paths for flexible traffic control. Enhance security with SSL configuration.

Framer Logo for Blog Authors

Uploaded by

Profile of Blogger Kim Yejeong

Translated by

Blog thumbnail explaining how to set up an NGINX reverse proxy. Includes server block configuration and SSL security methods to run a stable and secure Framer site.
Blog thumbnail explaining how to set up an NGINX reverse proxy. Includes server block configuration and SSL security methods to run a stable and secure Framer site.
Blog thumbnail explaining how to set up an NGINX reverse proxy. Includes server block configuration and SSL security methods to run a stable and secure Framer site.

Contents

Table of Contents

Basic Setup

First, update the server block in the /etc/nginx/sites-available/default file as shown below.

server {
    listen 80;
    server_name example.com www.example.com;

    resolver 8.8.8.8;

    location / {
        set $backend <https://example.framer.website>;
        proxy_pass $backend$request_uri;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

        proxy_ssl_server_name on

Applying this setting routes incoming requests to the Framer site, while users continue to see your domain (example.com) in the browser address bar.

Proxy Specific Slugs Only

If you wish to proxy specific slugs only (e.g., /blog or /pricing) instead of the entire site, add or modify a specific location block accordingly.

location /my-path {
    set $backend <https://example.framer.website>;
    proxy_pass $backend;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;

    proxy_ssl_server_name on

This allows only requests to /my-path to be routed to the Framer site, giving you finer control over which traffic is sent to Framer.

Why 'proxy_ssl_server_name on' is Necessary

400 Bad Request: Invalid hostname 오류를 나타냅니다.

This directive ensures that NGINX sends the correct host name using SNI (Server Name Indication) when forwarding requests. Without this setting, you may encounter a 400 Bad Request: Invalid hostname error when sending requests to a custom domain.

Securing Proxies with SSL

To protect users and encrypt traffic, HTTPS configuration is required.

Using Let's Encrypt with Certbot

  • It's free and integrates well with NGINX to automatically handle SSL certificate creation and renewal.

  • For a step-by-step guide, please refer to the Certbot documentation.

Using Existing Certificates

  • If you have certificates issued by providers like DigiCert or Sectigo, you can set them up with NGINX using directives such as ssl_certificate and ssl_certificate_key.

Self-Signed Certificates

  • These are fine for testing or internal purposes, but they are not recommended for live sites as they may trigger security warnings in browsers.

Conclusion

What paths would you like to connect with a reverse proxy? With just this setup, you can operate the Framer site securely and reliably from your domain. Initially, try proxying the entire server block, and later, consider specifying only the necessary paths for flexible operation.


This article is an adapted translation of Framer's official blog post ‘Proxying with NGINX’.

Share Blog

Share Blog

Share Blog

Become a
Framer Expert

Any expert capable of Framer outsourcing can apply.
We connect experts and clients directly, with no intermediary fees.

Become a
Framer Expert

Any expert capable of Framer outsourcing can apply.
We connect experts and clients directly, with no intermediary fees.

Become a
Framer Expert

If you are an expert available for Framer freelance work,
anyone can apply.
No intermediary fees, we directly connect
experts and clients.