How To Install Cgi Proxy

Posted on -
How To Install Cgi Proxy Rating: 4,9/5 3992 reviews

This tutorial shows how you can serve CGI scripts (Perl scripts) with nginx on OpenSUSE 12.2. While nginx itself does not serve CGI, there are several ways to work around this. I will outline two solutions: the first is to proxy requests for CGI scripts to Thttpd, a small web server that has CGI. After the server displays the contents of the folder with your site’s HTML files, click the “CGI” or “CGI-bin” folder name. Click the “Upload” or “File Uploard” button or link on the File Manager menu bar or toolbar. A new tab or window appears in the browser, which you can use to upload files to the server. Have you set executable permission on the script? If not, do chmod 755 nph-proxy.cgi.

Active2 years, 5 months ago

I'm trying to run a web proxy CGIProxy on one of my home servers that's running macOS 10.11.6. I've set up the web server using Apple's Server utility. Interpol our love to admire full album download.

By and large it works, but there's a few websites that when I try to connect to them via HTTPS it fails with the following error:

Net::SSLeay::read error: SSL_read 8284: 1 - error:14077410:lib(20):func(119):reason(1040)

Unfortunately I'm not particularly experienced with web servers or Perl so I have little idea what this means or how to fix it.

How To Install Cgi Proxy Windows 10

As an experiment, I set up an Ubuntu 14.04 server on a virtual machine, setup apache2, and installed CGIProxy on that, and it works just fine -- no SSL errors when connecting to the problematic sites.

So it looks like this has something to do with macOS being a bit of a different beast than Linux, which is not surprising. I've encountered several SSL-related problems with macOS systems before under different circumstances.

Any idea how to correct this problem?

GuyGizmo
How to install cgi proxy in firefoxGuyGizmoGuyGizmo
3311 gold badge4 silver badges20 bronze badges

1 Answer

So digging into this error more, I discovered it indicates a handshake error, likely due to macOS not having a properly up-to-date version of OpenSSL. Executing openssl version prints OpenSSL 0.9.8zh which doesn't support TLS 1.1 or 1.2, which is likely why it was failing.

The solution was to use homebrew to install a separate version of perl that links against homebrew's copy of OpenSSL. The current version of perl in homebrew as of me writing this is 5.24.1, which is newer than the version provided with macOS abd Ubuntu 14.04. When I installed it and tried running using it to execute CGIProxy, it crashed. So I instead tried perl 5.18, which did the trick.

In summary, the following fixes it:

Edit nph-proxy.cgi and change the first shebang line from:

To:

Cgi Proxy List

Cleared out ~/.cpan and ~/perl5 if you already ran ./nph-proxy init, run ./nph-proxy.cgi init again, and after it finished, I had no trouble using CGIProxy to access the websites that were problematic before.

Proxy Server Install

GuyGizmoGuyGizmo
3311 gold badge4 silver badges20 bronze badges

Not the answer you're looking for? Browse other questions tagged macosproxysslwebserverperl or ask your own question.

Active5 years, 9 months ago

I am trying to use Openlayer in a WEB application based on spring framework. I need to use a cgi proxy on tomcat. I followed the instruction here installing-a-cgi-on-tomcat. It works with a simple web application. But I got problem to access the cgi file when I tried to implement it with Spring MVC. I got the warning message.

I tried many ways,but I didnt figure out how to access the proxy.cgi file under WEB-INFcgi directory. Please help. Thanks.Attached is the content of web.xml.

AlexAlex

2 Answers

How To Install Cgi Proxy

You mapped CGIServlet to /cgi-bin/* and DispatcherServlet to /app/* - no surprise that request to <contextPath>/app/cgi-bin/proxy.cgi is handled by Spring rather than by CGI.

Try /pcms/cgi-bin/proxy.cgi instead.

axtavtaxtavt
212k34 gold badges460 silver badges452 bronze badges

The answer is: You don't install or use cgi proxy on Tomcat.

cgi is for apache server or IIS that are used as a front-end server. Tomcat may sit behind it. The configuration of Apache is detailed in: http://tomcat.apache.org/tomcat-6.0-doc/proxy-howto.html

Be warned that OpenLayers warns that its proxy.cgi is only an example and may not have good enough check to stop it from being exploited, i.e. it may run some malicious script.

Install

If you are serving your OpenLayers client page on Tomcat alone and it contains layers from other GeoServer or Mapserver, you can use proxy servlet and specify it as:

OpenLayers.ProxyHost = 'sevlet URL on the server that served this page';

YoichiYoichi
11.7k2 gold badges14 silver badges11 bronze badges

Not the answer you're looking for? Browse other questions tagged springtomcatcgi or ask your own question.