我有一个CodeIgniter应用程序,我用php 5.2部署到服务器,我的开发盒有5.3,有些东西不工作了。 我不想升级PHP和风险的服务器上的其他应用程序有问题。 无论如何,我编译了一个自定义的PHP,并将以下内容添加到/etc/httpd/conf.d/zcid.conf文件中的一个.conf文件以及所有其他conf文件。
<VirtualHost *:80> DocumentRoot /var/www/cid/app ServerName sub.example.co.nz </VirtualHost> <Directory "/var/www/cid/app"> authtype Basic authname "oh dear how did this get here i am no good with computer" authuserfile /path/to/auth require valid-user RewriteEngine on RewriteCond $1 !^(index\.php|robots\.txt|createEvent\.php|/cgi-bin) RewriteRule ^(.*)$ /index.php/$1 [L] AddHandler custom-php .php Action custom-php /cgi-bin/php53.cgi </Directory>
在/ var / www / cid / app中我有cgi-bin文件夹和从/ usr / local / php53 / bin / php-cgi复制的php53.cgi文件
但现在当我导航到子域时,它说:
在此服务器上未find请求的URL /cgi-bin/php53.cgi/index.php/。
如果我试图浏览到/ cgi-bin它说(它应该是什么?):
您无权访问此服务器上的/ cgi-bin /。
现在很困惑。 任何人都知道在这里做什么? 谢谢 :)
也许有看看这个线程: http : //codeigniter.com/forums/viewthread/96347/
chmod 777 cgi-bin