Reputation: 59
I have a public html folder with my html pages and CGI script written in c. Within that, I have my cgi-bin folder with my GCI executable. However when I try to access my cgi page in my browser, it gives me the forbidden error. I'm using firefox and a linux system. I've looked around for the correct permissions but resources often advise different combinations. Any help is appreciated!
Upvotes: 0
Views: 1227
Reputation: 305
As per your design ( 8 years ago on 2021), you did not provide permission for your cgi directory in the web server (possibly APACHE) configuration file.
Example in *nix: Lets say your cgi-bin directory is actually is in /usr/home/your-name/cgi-bin
Then you have to add this to your that domains cgi section of your servers (ie Apache 2.4++) configuration file.
ScriptAlias /cgi-bin/ "/usr/local/www/ceo/cgi-bin/"
<Directory "/usr/local/www/ceo/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>
And of course don't forget to turn on CGI module ( remove the #).
Upvotes: 0
Reputation: 1416
With a FTP client, or with console, check the rights to execute for the file. The apache process sould be able to execute it.
If this is right, and it still not work, then you have to properly configure the server.
Upvotes: 1