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?
 

ProWebUK

Verified User
Joined
Jun 9, 2003
Messages
2,326
Location
UK
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
 

secretman

Verified User
Joined
Nov 10, 2003
Messages
20
Why on ssh is impossible use the "pico" command?

Is impossible to edit files on ssh !!!

Is possible use another command for edit file?
 

ProWebUK

Verified User
Joined
Jun 9, 2003
Messages
2,326
Location
UK
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
 

secretman

Verified User
Joined
Nov 10, 2003
Messages
20
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:

ProWebUK

Verified User
Joined
Jun 9, 2003
Messages
2,326
Location
UK
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
 

secretman

Verified User
Joined
Nov 10, 2003
Messages
20
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?
 

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
9,005
Hello,

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