{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["img"]},"type":"markdown"},"seo":{"title":"Setting up a Reverse Proxy using NGINX","description":"Integrate and automate your content creation process with Foleon's powerful API.","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"setting-up-a-reverse-proxy-using-nginx","__idx":0},"children":["Setting up a Reverse Proxy using NGINX"]},{"$$mdtype":"Tag","name":"div","attributes":{"style":{"padding":"1em","backgroundColor":"#fff3cd","borderLeft":"5px solid #ffeeba","margin":"1em 0"}},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["⚠️ Warning:"]}," This guide provides a general overview of the configuration process. Technical requirements vary by environment; always consult your internal IT or security teams before applying these settings. If you would like to complete this setup with a Foleon technical expert, please contact ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Foleon Support"]}," or your ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Customer Success Manager."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"1-adding-your-domain-into-foleon","__idx":1},"children":["1. Adding your domain into Foleon"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["login to Foleon"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["go to \"Domains\" in the Admin Console (or your workspace)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use HTTPS protocol to ensure End to End encryption"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click \"Create new Domain\""]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Fill in the domain"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click the checkbox for reverse proxy"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["(optional) enter your certificate details"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click \"save\""]}]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/domains.3b86bffae10ff009a14daf55021f0e6bac24bc78dff6fe695f1202d24a89f377.9c1bb791.gif","alt":"domains.gif","withLightbox":true,"width":"","height":""},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"2-configure-the-nginx-location-block","__idx":2},"children":["2. Configure the Nginx Location Block"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To route traffic, you will add a location block to your Nginx site configuration file (typically located in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/etc/nginx/sites-available/"]},")."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"the-code-block","__idx":3},"children":["The Code Block"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Paste the following configuration inside your existing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["server { ... }"]}," block. Ensure it is placed before any generic \"catch-all\" locations."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"nginx","header":{"controls":{"copy":{}}},"source":"# Define the subfolder path you want to use\nlocation /en/guides/ {\n    # Set the Foleon target destination\n    # EU: https://s1.foleon.com\n    # US: https://s1.us.foleon.com\n    set $foleon_target \"https://s1.foleon.com\";\n\n    # Proxy Headers\n    proxy_set_header X-Forwarded-Host $host;\n    proxy_set_header X-Forwarded-Proto $scheme;\n    proxy_set_header X-Real-IP $remote_addr;\n    \n    # Connection Settings\n    proxy_pass $foleon_target;\n    proxy_ssl_server_name on;\n    proxy_ssl_protocols TLSv1.2 TLSv1.3;\n    proxy_redirect off;\n\n    # Performance Buffers (Ensures large publications load smoothly)\n    proxy_buffer_size 128k;\n    proxy_buffers 4 256k;\n    proxy_busy_buffers_size 256k;\n}\n","lang":"nginx"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"3-variable-reference","__idx":4},"children":["3. Variable Reference"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can customize the proxy behavior by adjusting these specific values within the configuration:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Variable / Directive"},"children":["Variable / Directive"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Example Value"},"children":["Example Value"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["location"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/en/guides/"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The subfolder path on your domain where the content will appear. When applying your domain to your project, ensure the basepath also starts with /en/guides/."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["$foleon_target"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://s1.foleon.com"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["s1.foleon.com"]}," for EU accounts and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["s1.us.foleon.com"]}," for US accounts."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["X-Forwarded-Host"]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$host"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Passes your actual domain name to Foleon so it knows which content to serve."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"4-deploy-and-test","__idx":5},"children":["4. Deploy and Test"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Test the configuration:"]}," Run the following command in your terminal to ensure there are no syntax errors: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sudo nginx -t"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Reload Nginx:"]}," If the test is successful, apply the changes: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sudo systemctl reload nginx"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Verify:"]}," Navigate to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://yourcompany.com/en/guides/"]}," (or your chosen path). A Foleon 404 should now show. Once you finished step 5 your Foleon content should now load invisibly under your domain."]}]}]},{"$$mdtype":"Tag","name":"div","attributes":{"style":{"padding":"1em","backgroundColor":"#e7f5ff","borderLeft":"5px solid #339af0","margin":"1em 0"}},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["SSL requirement:"]}," Foleon requires HTTPS. Ensure your Nginx server has a valid SSL certificate (e.g., via Let's Encrypt) active for the host domain.\n"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"5-apply-a-domain-to-a-project","__idx":6},"children":["5. Apply a domain to a project"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Login to foleon."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Go to project settings."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select the newly created domain."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Setup the basepath / subfolder you want to use to publish your documents on."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Make sure to publish a document in this project."]}]},{"$$mdtype":"Tag","name":"div","attributes":{"style":{"padding":"1em","backgroundColor":"#e7f5ff","borderLeft":"5px solid #339af0","margin":"1em 0"}},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["TIP:"]}," You can setup multiple projects with the same basepath e.g. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/en/guide/finance/"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/en/guide/legal/"]}]}]},"headings":[{"value":"Setting up a Reverse Proxy using NGINX","id":"setting-up-a-reverse-proxy-using-nginx","depth":1},{"value":"1. Adding your domain into Foleon","id":"1-adding-your-domain-into-foleon","depth":2},{"value":"2. Configure the Nginx Location Block","id":"2-configure-the-nginx-location-block","depth":2},{"value":"The Code Block","id":"the-code-block","depth":4},{"value":"3. Variable Reference","id":"3-variable-reference","depth":2},{"value":"4. Deploy and Test","id":"4-deploy-and-test","depth":2},{"value":"5. Apply a domain to a project","id":"5-apply-a-domain-to-a-project","depth":2}],"frontmatter":{"seo":{"title":"Setting up a Reverse Proxy using NGINX"}},"lastModified":"2026-03-31T14:06:01.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/reverse_proxy/nginx","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}