N8N behind Apache Reverse Proxy

Hey @chizuoka,

Welcome to the community :cake:

We consider self hosting n8n to be an advanced configuration option and we rely on your knowledge of the services you want to use around n8n this would include your reverse proxy of choice.

As a starting point though the example below is a minimal example of what needs to be done for Apache.

<VirtualHost *:80>
        ServerName n8n.yourdomain.tld

        RewriteEngine On
        RewriteCond %{HTTP:Upgrade} =websocket [NC]
        RewriteRule /(.*)           ws://172.17.0.1:5678/$1 [P,L]
        RewriteCond %{HTTP:Upgrade} !=websocket [NC]
        RewriteRule /(.*)           http://172.17.0.1:5678/$1 [P,L]
        ProxyPassReverse /          http://n8n.yourdomain.tld
</VirtualHost>

You may be able to find more information in the posts below: