Skip to content
Last updated

Setting up a Reverse Proxy using Apache

⚠️ 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 Foleon Support or your Customer Success Manager.

1. Adding your domain into Foleon

  • login to Foleon
  • go to "Domains" in the Admin Console (or your workspace)
  • Use HTTPS protocol to ensure End to End encryption
  • Click "Create new Domain"
  • Fill in the domain
  • Click the checkbox for reverse proxy
  • (optional) enter your certificate details
  • Click "save"
domains.gif

2. Configure the Apache VirtualHost Block

To route traffic, you will add a <Location> block to your Apache VirtualHost configuration file (typically located in /etc/apache2/sites-available/ for Debian/Ubuntu or /etc/httpd/conf.d/ for RHEL/CentOS).

NOTE: Make sure you have the required Apache modules enabled: mod_proxy, mod_proxy_http, mod_headers, and mod_ssl.

The Code Block

Paste the following configuration inside your existing <VirtualHost *:443> block.

# Ensure SSL Proxy Engine is enabled so Apache can talk to Foleon over HTTPS
SSLProxyEngine on

# Define the subfolder path you want to use
<Location /en/guides/>
    # Proxy Headers
    # Passes the original request details to Foleon
    RequestHeader set X-Forwarded-Host expr=%{HTTP_HOST}
    RequestHeader set X-Forwarded-Proto expr=%{REQUEST_SCHEME}
    RequestHeader set X-Real-IP expr=%{REMOTE_ADDR}
    
    # Connection Settings
    # EU: https://s1.foleon.com/en/guides/
    # US: https://s1.us.foleon.com/en/guides/
    ProxyPass "https://s1.foleon.com/en/guides/"
    ProxyPassReverse "https://s1.foleon.com/en/guides/"
</Location>

3. Variable Reference

You can customize the proxy behavior by adjusting these specific values within the configuration:

Variable / DirectiveExample ValueDescription
<Location>/en/guides/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/.
ProxyPass & ProxyPassReversehttps://s1.foleon.com/en/guides/Use s1.foleon.com for EU accounts and s1.us.foleon.com for US accounts, together with the location path.
X-Forwarded-Hostexpr=%{HTTP_HOST}Passes your actual domain name to Foleon so it knows which content to serve.

4. Deploy and Test

  1. Test the configuration: Run the following command in your terminal to ensure there are no syntax errors:

    • Ubuntu/Debian: sudo apache2ctl configtest
    • RHEL/CentOS: sudo apachectl configtest
  2. Reload Apache: If the test returns Syntax OK, apply the changes:

    • Ubuntu/Debian: sudo systemctl reload apache2
    • RHEL/CentOS: sudo systemctl reload httpd
  3. Verify: Navigate to https://yourcompany.com/en/guides/ (or your chosen path). A Foleon 404 should now show. Once you finish step 5, your Foleon content should load invisibly under your domain.

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.

5. Apply a domain to a project

  1. Login to foleon.
  2. Go to project settings.
  3. Select the newly created domain.
  4. Setup the basepath / subfolder you want to use to publish your documents on.
  5. Make sure to publish a document in this project.
TIP: You can setup multiple projects with the same basepath e.g. /en/guide/finance/ and /en/guide/legal/