Cgi out of cgi-bin folder

secretman

Verified User
Joined
Nov 10, 2003
Messages
20
Hello,
i have try to insert a cgi script out of the cgi-bin folder
but have received forbidden access error 403.

I have need to insert cgi script out of cgi-bin folder.

How to make it?
 
Open up the users httpd.conf:

/usr/local/directadmin/data/users/username/httpd.conf

if you want a cgi / pl area besides the cgi-bin you should be ok simply adding a second ScriptAlias directive

ScriptAlias /cgi-bin/ ................../cgi-bin/
ScriptAlias /new-path/ .........../new/path/

Chris
 
Why on ssh is impossible use the "pico" command?

Is impossible to edit files on ssh !!!

Is possible use another command for edit file?
 
If you dont have pico installed you need to install it else you cant use it

An alternative text editor thats distributed as standard and should be on all systems is vi...

vi <filename>

press i to be able to edit / insert information

press esc to get out of insert function

then:

save file and exit: :x <enter>
File has not been modified - just exit: :q <enter>
File has been modified - exit without saving: :q! <enter>

VI is alot more difficult to learn than pico however it is safer and available where pico isnt :)

Chris
 
Thank you for info but don't work.

I have inserted with vi command :

ScriptAlias /public_html/ /home/admin/domains/mydomain.com/public_html/

and have reboot server but show error 403 ever for every cgi inserted on public_html :(
 
Last edited:
Do you have CGI enabled, as go into list accounts select the domain and check that:

CGI-Bin | ON

Also, as default you can **only** place CGI scripts in the cgi-bin directory and permissions MUST be set correctly for the script to work.

Chris
 
The domain under the user of direct admin have cgi-bin on.

Some feature of user.

Shell Access (ssh) ON
Secure Socket Layer (ssl) ON
CGI-Bin ON
PHP ON
Anonymous Ftp ON
DNS Control ON

Is impossible remove the 403 error out of cgi-bin folder using the
httpd.conf modification that you have marked.
The ftp permission are correct (755).

Is a direct admin bug?
 
Hello,

You could always just create an .htaccses file in your public_html directory with:
Code:
Options +ExecCGI
John
 
Back
Top