Articles of cgi

从具有更好URL的子域访问cgi脚本

我想访问此页面(工作) http://stats.example.com/cgi-bin/awstats.pl?config=www.example.com 通过 http://stats.example.com/?config=www.example.com <VirtualHost *:80> ServerName stats.example.com DocumentRoot /usr/lib/cgi-bin/ DirectoryIndex awstats.pl </VirtualHost> 然而这触发了awstats.pl的下载,显然不是我的意图。 我怎么能做这个工作,或者有一个我失踪的概念?

在网站上启用Windows身份validation,只允许一些用户

我正在调查这个问题。 我有一个通过IIS7发布的网站发布的CGI应用程序。 编辑:我改变了web.config使用url授权。 这是一个名为secure的文件夹的web.config,这是该特定文件夹的web.config <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <security> <authorization> <remove users="*" roles="" verbs="" /> <add accessType="Allow" roles="MyDOMAIN\MyRole" /> <add accessType="Deny" users="*" /> </authorization> </security> </system.webServer> </configuration> 用这个configuration它不工作,但如果我删除拒绝它再次工作,也许是规则? 我改变了网站configuration,以使用Windows身份validation,然后拒绝所有用户,但与当前web.config <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <handlers accessPolicy="Read, Execute, Script" /> <directoryBrowse enabled="false" /> </system.webServer> <system.web> <authentication mode="Windows"> </authentication> <authorization> <allow users="MYDOMAIN\myname2"/> <deny users="?"/> <deny users="*"/> […]

Apache服务器CGI错误500

我试图为GIT的“cgit”web-ui设置一个服务器。 我已经从开发人员的网站下载了源代码,并按照说明正确编译了它。 我的default-server.conf如下所示: # # Global configuration that will be applicable for all virtual hosts, unless # deleted here, or overriden elswhere. # DocumentRoot "/srv/www/htdocs/cgit" # # Configure the DocumentRoot # <Directory "/srv/www/htdocs"> # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews […]

编译FastCGIWrap在slackware上失败(nginx cgi支持)

我目前正试图让nginx与使用cgi的cgit一起工作。 我知道nginx不直接支持cgi,但似乎可以通过FastCGIWrap间接支持它。 上面的链接是非常明显的,但我在编译程序时遇到问题。 到目前为止我所做的是: 安装了libfcgi-2.4.0 cd fcgiwrap && autoconf -i 当我运行./configure我得到这个输出 checking for gcc… gcc checking for C compiler default output file name… a.out checking whether the C compiler works… yes checking whether we are cross compiling… no checking for suffix of executables… checking for suffix of object files… o checking whether we are using […]

ExecCGI在这个目录下closures

我试图在我的Mac的Web服务器上运行python cgi脚本。 每次我访问文件@ localhost / site.py我得到一个403禁止的错误。 我在看我的Apache的错误日志,它说: [Mon Jun 11 09:52:42 2012] [error] [client ::1] Options ExecCGI is off in this directory: /Users/<username>/Sites/site.py 我已经改变了我的httpd.conf文件,以便我的文档根目录是/ Users // Sites 在我的用户的.conf文件中,我有以下内容: <Directory "/Users/<username>/Sites/"> Options All AllowOverride All Order allow,deny Allow from all AddHandler cgi-script .py </Directory> 为什么它告诉我ExecCGIclosures,当我允许我的用户的.conf文件中的所有选项?

Web服务器Nginx + PHP FPM访问.cgi脚本拒绝错误

使用Nginx 1.1.19和PHP 5的Web服务器FPM可以很好地服务于PHP并显示mysql数据的输出。 我想在我的应用程序中embeddednagios,所以我第一次在这台服务器上需要.cgi脚本。 这没有奏效。 然后,我做了一个简单的echo hello world .cgi脚本,我仍然得到“访问被拒绝”。 我给了文件和它上面的所有文件夹执行权限(chmod + x)

IIS 6.1中使用Python / CGI的“错误文件描述符”错误

背景 : 我试图(强调“尝试”)通过IIS(6.1,Windows Server 2008 R1)设置一个应用程序,通过一个Python脚本路由所有请求。 最终目标是在服务器上创build一个非常轻量级的API。 基本上,我采取了以下步骤: 添加到Windows的CGIfunction 在默认网站下创build一个新的应用程序 添加一个处理程序映射,接受*并运行c:\Python27\python.exe -u "c:\inetpub\wwwroot\testapi\cgiadapter.py" 将应用程序的虚拟目录设置为testapi 将应用程序的物理path设置为c:\inetpub\wwwroot\testapi 做一个基本的testing,下面的脚本被testing和工作: import cgi, cgitb # Detailed error logging to screen cgitb.enable() # Output basic response print 'content-type:text/plain' print print 'Hello World' 然后,我尝试更新脚本以读取来自stdin的请求 import cgi, cgitb # Detailed error logging to screen cgitb.enable() # Attempt to read the raw request from […]

Apache:使用Fast-CGI并行运行标准PHP

我想运行一个服务器,通过FastCGI将某些请求委托给一个C ++脚本 – 我怎样才能configurationApache呢? 将请求redirect到我可以在某个configuration文件中定义的特定页面就足够了,但不幸的是,我不知道是哪一个以及如何。 如果有人能帮忙,我会很高兴的 – 谢谢。

CGI和Python脚本文件正在从服务器下载,而不是在那里执行

我在/ var / www / cgi-bin下保留了一些cgi,python文件,并试图执行我遵循的所有步骤: http://webpython.codepoint.net/cgi_tutorial 我仍然无法执行。 当我input192.168.1.191/cgi-bin/sample.py或192.168.1.191/cgi-bin/example.cgi,我得到文件下载popup。 我需要做任何其他的变化,除了在链接中显示的。

删除进程(和subprocess)访问文件系统?

有没有一个unixtypes的免费操作系统,允许我删除所有的磁盘访问特定进程和任何它的孩子? #!/usr/bin/perl -w use strict; use Perl6::Slurp; my $infile= slurp("/etc/myprogramconfit.txt"); ## still legal **remove_all_disk_access();** ## STDIN and STDOUT don't access disk, so they are still ok. while (<>) { print "$_"; ## somewhere deep inside another module… open(FO, "< /etc/password"); ### ALWAYS ERROR: $! open(FO, "> ~/bin/ls"); ### ALWAYS ERROR: $! system("/bin/ls"); ## ALWAYS ERROR: […]