500 Internal server error
The internal server error might be caused by several reasons. Here i am
providing solution for one of it. check your web server error log [
mostly it will be at /etc/httpd/logs ]. If the last few line of the
error log contains the lines similar to
(13)Permission denied: exec of '/var/www/html/index.py' failed
(13)Permission denied: exec of '/var/www/html/index.cgi' failed
or something similar, then solution to this as follow. If not, the error occured by some other reason. Try this site. Htmlfixit .
You might face this error when you are trying to do some CGI programming in your system via apache server. Most of the time this error does not occur due to apache server misconfiguration, its mainly due to SElinux installed in your system.
A brief note about SElinux : SElinux [ Security Enhanced Linux ] is installed by default in Fedora and many other linux distribution. Its a super cool feature when one speak about security. But many time its become annoying for normal user who dont care about security that much.
The solution to this problem. Its simple, Just change the SElinux Context of the file [ index.py or index.pl or index.cgi ] to httpd_user_script_exec_t. If you dont know how to change it. Let me show you how.
Steps:
(13)Permission denied: exec of '/var/www/html/index.py' failed
(13)Permission denied: exec of '/var/www/html/index.cgi' failed
or something similar, then solution to this as follow. If not, the error occured by some other reason. Try this site. Htmlfixit .
You might face this error when you are trying to do some CGI programming in your system via apache server. Most of the time this error does not occur due to apache server misconfiguration, its mainly due to SElinux installed in your system.
A brief note about SElinux : SElinux [ Security Enhanced Linux ] is installed by default in Fedora and many other linux distribution. Its a super cool feature when one speak about security. But many time its become annoying for normal user who dont care about security that much.
The solution to this problem. Its simple, Just change the SElinux Context of the file [ index.py or index.pl or index.cgi ] to httpd_user_script_exec_t. If you dont know how to change it. Let me show you how.
Steps:
- Start file browser. [ nautilus ]
- Browse to the file index.pl or index.py or index.cgi. [ Mostly the file will be at "/var./www/html/" ]
- Right click then file and select properties.
- Now click the permission tab.
- There you can see SELinux Context drop down box.
- Click it and select "httpd_user_script_exec_t"
- Click close. Thats all. No apache restart is required.
Comments
Post a Comment