Articles of cgi

Nginx + fastcgi来运行PHP脚本,但它一直告诉我“文件未find”

这是服务器块中的一部分configuration: 我无法执行任何PHP脚本,我在/ var / html test.php了一个名为test.php的文件,但是当我指向http://localhost/test.php ,我得到一个结果: File not found. , 这不是由nginx生成的,因为它不同于nginx的404页面。 location / { root /var/html; index index.html index.htm; } location ~ \.php$ { fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; fastcgi_index index.php; fastcgi_intercept_errors on; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi.conf; } 我错过了什么?

你如何赋予Apache2用户执行权限而不是其他人?

我有Ubuntu服务器运行,我设置一个单独的目录作为一个CGI斌。 我有目录准备好,我改变了该网站的文件。 但是,为了让它起作用,我需要更改文件夹中的Python脚本的权限,以便Apache可以执行它。 但是,我不想写入或执行除root,me和Apache以外的任何其他用户。 我假设这是可能的,但是怎么做呢?

Apache 2.4用“403 Forbidden”回复CGI脚本,我的configuration看起来不错

我在Ubuntu服务器14.04上安装了Apache 2.4的全新安装CGI脚本。 Apache不断回答403 Forbidden,如果对我来说,configuration文件是好的。 CGI是Monitorix的前端,一个用Perl编写的系统监视工具。 configuration文件/etc/apache2/conf-enabled/monitorix.conf是: Alias /monitorix /var/lib/monitorix/www ScriptAlias /monitorix-cgi /var/lib/monitorix/www/cgi <Directory /var/lib/monitorix/www/cgi/> DirectoryIndex monitorix.cgi Options ExecCGI <IfModule mod_authz_core.c> # Apache 2.4 Require all granted </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order deny,allow Allow from all </IfModule> </Directory> /var/lib/monitorix/www和/var/lib/monitorix/www/cgi所有文件至less都具有读取权限。 每次我尝试从URL /monitorix访问,在我的Apache日志中,我看到行: [Mon Sep 01 06:57:52.995680 2014] [authz_core:error] [pid 17145] [client xxxx:58879] AH01630: client denied […]

这个剧本是邪恶的吗?

这是坐在我的网站的CGI斌。 我应该关心它吗? #!/usr/bin/perl print <<HTML; Content-type: text/html <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html"> <link rel="stylesheet" type="text/css" href="../../css/style.css"> </head> <body> <table cellspacing="0" cellpadding="0" border="0"> <tr class="subhead" align="Left"><th>Name</th><th>Value</th></tr> HTML my $class; foreach (sort keys %ENV) { next unless /^HTTP_|^REQUEST_/; $class = ($class ne 'normal')? 'normal': 'alt'; print <<HTML; <tr class="$class"><td […]

在远程机器上的“svn update”

我需要能够在非技术用户的远程计算机上运行“svn update”,我该怎么办? 我们的非技术用户使用Windows XP,并安装了龟甲SVN客户端。 我正在考虑做下面的事情,但是我到目前为止还没有真正有利于… 批处理(在Windows上本地运行) Shell(在远程机器上运行需要SSH访问/客户端) CGI(通过networking在远程机器上运行)

Apache2 CGI的odbc数据库访问崩溃(但从shell运行良好)

问题概述(详情如下): 尝试连接到ODBC数据源时遇到了apache2 + ruby​​集成问题。 主要的问题归结为,从apache2作为cgi运行时,交互式shell运行正常的脚本会在数据库连接线上发生ruby。 不尝试访问ODBC数据源的Ruby cgi的工作正常。 而且(再次)ruby脚本连接到数据库与ODBC做罚款从命令行(或cron)执行。 当我使用perl而不是ruby时,这种行为是相同的。 所以,这个问题似乎是由apache2为ruby(perl)提供的环境,但我无法弄清楚什么是错的,或者该怎么做。 有没有人有任何build议如何让这些CGI脚本正常工作? 我已经尝试了许多不同的事情来实现这个目标,如果能够提供帮助,我很乐意提供任何方面的更多细节。 细节: Mac OS X Server 10.5.8 Xserve 2 x 2.66双核Intel Xeon(12 GB)Apache 2.2.13 ruby1.8.6(2008-08-11 patchlevel 287)[universal-darwin9.0] ruby​​-odbc 0.9997 dbd-odbc(0.2.5) dbi(0.4.3) mod_ruby 1.3.0 Perl – 5.8.8 DBI – 1.609 DBD :: ODBC – 1.23 odbc驱动程序:DataDirect SequeLink v5.5(/Library/ODBC/SequeLink.bundle/Contents/MacOS/ivslk20.dylib) odbc数据源:FileMaker Server 10(v10.0.2.206) )一个最小版本的脚本(匿名),将在apache中崩溃,但从shell成功运行: #!/usr/bin/ruby require 'cgi' […]

在Ubuntu 9.04上安装CGI

我回顾了很多指南,以找出为什么我的CGI不工作,不能“似乎find它。 我的网站configuration如下所示: <VirtualHost *:80> ServerName dev.domain.com # Directory Root. DocumentRoot /sites/dev.domain.com/www/ # CGI Directory ScriptAlias /cgi-bin/ /sites/dev.domain.com/cgi-bin/ <Location /cgi-bin> Options +ExecCGI </Location> <Directory /sites/dev.domain.com/www/bugzilla> Options ExecCGI AddHandler cgi-script cgi pl </Directory> # Logfiles ErrorLog /sites/dev.domain.com/logs/error.log CustomLog /sites/dev.domain.com/logs/access.log combined </VirtualHost> 我试图让CGI上/ bugzilla。 我不确定它是否在cgi-bin上运行。 我也安装perl使用sudo aptitude install libapache2-mod-perl2 更新 CGI bin不在我的www目录中,有没有一种方法可以通过命令行来testing?

我如何使用Python的CGIHTTPRequestHandler作为PHP的开发服务器

我喜欢如何尝试一个Rails应用程序,我只是键入script/server 。 我希望有一种方法可以从PHP项目的顶层目录中做类似的事情。 这个问题的答案 “从python简单http服务器下载PHP文件”引起了我的注意。 任何想法如何可以适应与PHP项目目录树的工作?

如何将php5 cgi转换为模块?

我在debian lenny系统上安装了PHP5作为cgi。 现在我发现,PHP中的flush()只适用于安装为模块的PHP。 任何人都知道如何(重新)安装php5作为模块? (apache2的) 谢谢 :)

在新的服务器上给PHP 500内部服务器错误

我试图运行一个简单的PHP脚本显示phpinfo(),但我得到500内部服务器错误。 可能是什么原因? 是否因为PHP处理程序设置为suPHP,我将其更改为DSO或CGI? 谢谢