ScriptAlias configuration not working in apache2
I installed apache2 on ubuntu. I added the following to /etc/apache2/httpd.conf
file
ScriptAlias /cgi-bin/ "/home/PROJECT/cgi-bin/"
I am able to open the cgi file if i copy the cgi file to /usr/lib/cgi-bin/hello.cgi
[DocumentRoot directory] and access the URL http://localhost/cgi-bin/hello.cgi
, but i get cannot access the file if i put it in /home/PROJECT/cgi-bin/hello.cgi
even though ScriptAlias
is set and apache2 restarted.
Any thing that i am miss开发者_如何学JAVAing here ?
I had the same problem. The reason was in httpd.conf, I had to remove global
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
otherwise everything starting /cgi-bin/ fell into /var/www/cgi-bin/.
精彩评论