|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
|
|
#1
|
|||
|
|||
|
HI,
I am using apache on Linux Redhat 7.1 and i cant figure out how to configure apache to let URL and files like that to run as cgi scripts. I am new to apache and i couldnt figure out how to do it. I hope someone can help thank you. |
|
#2
|
|||
|
|||
|
Please start here -> http://httpd.apache.org/docs/mod/mod_userdir.html
Assuming you can execute CGI scripts in default server without a problem. Make sure you have at least ExecCGI within the <Directory> block. <Directory "/home/*/public_html"> AllowOverride All Options ExecCGI ... </Directory> When you are comfortable with this, you can tighten it by adding: <Directory "/home/*/public_html/cgi-bin"> AllowOverride None Options +ExecCGI ... </Directory> and remove ExecCGI from <Directory "/home/*/public_html"> so that CGI scripts is allowed only in cgi-bin. |
|
#3
|
|||
|
|||
|
Firstly thanks for you time to reply.
I tried what u said. But this time it keeps giving me 500 internal server error. The cgi script was a simple one with no mistakes. And i tried it on the main apache directory. It worked fine but when i try it in ~user/cgi-bin it gives me a 500 internal server error. Would you know why? |
|
#4
|
|||
|
|||
|
hi darksoul,
I am also having problems with executing cgi-scripts. Are you able to execute cgi-scripts at all. I have a post here as well subject another 505 error problem. I am only able to run scripts from the command line for example >perl myscript.cgi When I try to run script through browser I get internal server error. If you are able to run scripts through browser was there anything special you had to do with your httpd.conf file. thanks optimised |
|
#5
|
|||
|
|||
|
Hi,
My document root for the server is /var/www/html and for cgi-bin it is /var/www/cgi-bin. When i put my cgi file in /var/www/cgi-bin it works fine. But when i try to run a cgi script from my user directory it doesnt work. I tried what freebsd said this time i started getting 500 internal server errors. When i comment the AddHandle cgi-script .cgi line it shows the code when i uncomment it i get an error. So far i couldnt figure it out. If i ever get help and succeed in doing that i will let u know ![]() P.S.: I mean URL as an example of cgi script run from the user directory. |
|
#6
|
|||
|
|||
|
Thanks darksoul,
If I undersand you correctly you are able to run the script in your browser if the script is in your /var/www/cgi-bin directory?? Have your tried this for user.. //httpd.conf file UserDir public_html <Directory "/home/[a-z]+/public_html/cgi-bin"> Options ExecCGI AddHandler cgi-script .cgi .pl </DirectoryMatch> Found this on the net somewhere trying to solve my problem of even getting the script to run in browser. The only info attached with this tip was remember to enter username in lowercase. If you would like to share your httpd file my email address hometoolz@hometoolz.com Good Luck |
|
#7
|
|||
|
|||
|
>> It worked fine but when i try it in ~user/cgi-bin it gives me a 500
1) What's the full system path to this cgi-bin directory? 2) Is it scriptalias'ed? 3) Can you execute CGI scripts in docroot of your ~user dir like so? /home/user/public_html/script.cgi -> http://localhost/~user/script.cgi |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > How To Configure Apache To Let ~user Accounts To Execute Cgi Script |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|