[GH-ISSUE #1781] Unable to serve cgi #1317

Closed
opened 2026-02-26 07:30:28 +03:00 by kerem · 1 comment
Owner

Originally created by @cgrard on GitHub (Jan 20, 2022).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1781

Hi there,

I have an internal server with CGI stuff served by Apache on port 81 and I would like to serve it through the reverse proxy, it seems easy enough as the CGI stuff is working when I access the direct ip:port but as soon as I create the new proxy host, it always end up in 504 Gateway Time-out error (even though it somehow works as it redirect to HTTPS properly, then it goes around in circles and timeout.

Here is the vhost Apache configuration I need to proxy to :

<VirtualHost *:81>
    DocumentRoot "/var/www/html/cgi"

    ErrorLog "/var/log/apache2/cgi_error_log"
    CustomLog "/var/log/apache2/cgi_access_log" combined

        <Directory "/var/www/html/cgi/">
            Options +Indexes +FollowSymLinks -MultiViews +ExecCGI
            AllowOverride All
            Require all granted
        </Directory>

    AddHandler cgi-script .cgi

</VirtualHost>

Is there anything obvious I'm missing ?

Originally created by @cgrard on GitHub (Jan 20, 2022). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1781 Hi there, I have an internal server with CGI stuff served by Apache on port 81 and I would like to serve it through the reverse proxy, it seems easy enough as the CGI stuff is working when I access the direct ip:port but as soon as I create the new proxy host, it always end up in 504 Gateway Time-out error (even though it somehow works as it redirect to HTTPS properly, then it goes around in circles and timeout. Here is the vhost Apache configuration I need to proxy to : ``` <VirtualHost *:81> DocumentRoot "/var/www/html/cgi" ErrorLog "/var/log/apache2/cgi_error_log" CustomLog "/var/log/apache2/cgi_access_log" combined <Directory "/var/www/html/cgi/"> Options +Indexes +FollowSymLinks -MultiViews +ExecCGI AllowOverride All Require all granted </Directory> AddHandler cgi-script .cgi </VirtualHost> ``` Is there anything obvious I'm missing ?
kerem closed this issue 2026-02-26 07:30:28 +03:00
Author
Owner

@cgrard commented on GitHub (Jan 21, 2022):

Indeed there was something obvious : the reverse proxy is in another VLAN and it does not have access to port 81...

<!-- gh-comment-id:1018516212 --> @cgrard commented on GitHub (Jan 21, 2022): Indeed there was something obvious : the reverse proxy is in another VLAN and it does not have access to port 81...
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#1317
No description provided.