Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
I have a RHEL 4 server,
To run a cgi file that is located in the /var/www/html/speedtest directory I've added this configuration to the /etc/httpd/conf/httpd.conf file:
My SElinux is disabled and I have set all the permissions to 777.
I have a index.php in the speedtest directory that calls the cgi script.
I tested when I put the following line:
Code:
ScriptAlias /speedtest/ "/var/www/html/speedtest"
I get this error:
Code:
Forbidden
You don't have permission to access /speedtest/ on this server.
when I delete the ScriptAlias line, the cgi file shows in the browser instead of running!
My SElinux is disabled and I have set all the permissions to 777.
I have a index.php in the speedtest directory that calls the cgi script.
I tested when I put the following line:
Code:
ScriptAlias /speedtest/ "/var/www/html/speedtest"
I get this error:
Code:
Forbidden
You don't have permission to access /speedtest/ on this server.
when I delete the ScriptAlias line, the cgi file shows in the browser instead of running!
was fine. To execute scripts from a directory other than the one defined with ScriptAlias, you need the AddHandler directive and the +ExecCGI option.
You should have looked in apache error_log to find the reason of the 500 error.
Anyway since you get the script code check if your cgi-script extension in included in the AddHandler directive
Forbidden
You don't have permission to access /speedtest/ on this server.
when I delete the ScriptAlias line, the cgi file shows in the browser instead of running!
What should I do?
Sorry that I made a typo in my post. There must be a slash at the directory name as well.
Without it, the trailing slash in /speedtest/ gets lost in translation. That's why your webserver won't find the script.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.