DeveloperSide.NET Forums
July 05, 2020, 02:12:03 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: You don't have permission to access /cgi-bin  (Read 14565 times)
0 Members and 1 Guest are viewing this topic.
jcsousa
Member
*
Posts: 9


View Profile
« on: December 11, 2006, 10:44:35 PM »

v1.18s-httpd22 version worked fine without any further configuration but the newer version v1.90-httpd22-ssl.
I am unable to have apache execute any Perl script from a virtual domain I get this error
(You don't have permission to access /cgi-bin/ script.pl).

ScriptAlias /cgi-bin/ "E:/www/webroot/domain1/cgi-bin/script.pl

Everything I have read so far confuses me more.

Thanks
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #1 on: December 11, 2006, 11:19:44 PM »

You can do it two ways...

Edit \www\Apache22\conf\Suite-extra\cgi-bin.conf and replace the two occurrences of "/www/cgi-bin/" with your path. Restart Apache.

That or you need to put the ScriptAlias line into your virtual host block and create a similar dir permissions block there, as is in cgi-bin.conf.

Also its best to ScriptAlias to a dir and not to an actual script. Also make sure to check \www\Apache22\logs\error.log
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
jcsousa
Member
*
Posts: 9


View Profile
« Reply #2 on: December 12, 2006, 12:30:16 AM »

Thanks for the quick response got it to work apparently I needed to ad the actual path with the drive letter E:/

Quote
Edit \www\Apache22\conf\Suite-extra\cgi-bin.conf and replace the two occurrences of "/www/cgi-bin/" with your path. Restart Apache.

This does not work.

Quote
That or you need to put the ScriptAlias line into your virtual host block and create a similar dir permissions block there, as is in cgi-bin.conf.

Here is an example of what I was using as VirtualHost record.

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.com
    DocumentRoot /www/webroot/dummy-host.com/public_html
    ServerName dummy-host.example.com
    ServerAlias www.dummy-host.com
    ScriptAlias /cgi-bin/ /www/webroot/dummy-host.com/cgi-bin/
    ErrorLog logs/dummy-host.com-error_log
    CustomLog logs/dummy-host.com-access_log common
</VirtualHost>

So I tried the following line and the script works now.
 
ScriptAlias /cgi-bin/ E:/www/webroot/dummy-host.com/cgi-bin/

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.com
    DocumentRoot /www/webroot/dummy-host.com/public_html
    ServerName dummy-host.example.com
    ServerAlias www.dummy-host.com
    ScriptAlias /cgi-bin/ E:/www/webroot/dummy-host.com/cgi-bin/  
    ErrorLog logs/dummy-host.com-error_log
    CustomLog logs/dummy-host.com-access_log common
</VirtualHost>

I haven't made any other changes; I am puzzled why I had to ad the drive letter?

This works fine now thanks.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!