Why cgi scripts need to remain in cgi-bin folder ?
What's the difference from place python script ( or php script or other script ) in public places_html folder as well as in cgi-bin folder ?
I do not understand :-
They do not have. The only real restriction is the fact that CGI scripts need to be in deirectory that has
directive started up, as well as in default Apache configuration only /cgi-bin directory has this method on. But nothing prevents you against enabling CGI in other sites.
Some think that putting all CGI scripts in one location is much more secure.
It doesn't need to be within the cgi-bin, but you need to specify where! For instance I moved mine to my primary www folder where your index.htm file could be.
#ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" <-This was the original ScriptAlias /html/ "/var/www/html" # # "/var/www/cgi-bin" should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. #Directory below used to be /var/www/cgi-bin <Directory "/var/www/html"> AllowOverride None Options ExecCGI <-this line used top be Options None Order allow,deny Allow from all </Directory>