Changes

Jump to: navigation, search

Tung httpd conf

98 bytes added, 22:34, 27 July 2011
Create a web script in user's home
# Open a browser, and enter <code> http://hostname/~user/</code>. Your personal page should display.
===Create a web cgi script in user's home===
#Login as a root
#Edit configuration file <b><code><font color=brown >/etc/httpd/conf/httpd.conf </font></code></b>again. Add handler for .cgi and exec cgi option
#:</Directory> </code></font>
#Restart the Apache server: <b><code><font color=green >service httpd restart</font></code></b>
#By default, selinux doesn't allow Apache Server to read file inside user's home. #:Change the default setting:<b><code><font color=green > setsebool -P httpd_enable_cgi 1</font></code></b>#Add context type to make script exexutable. To do that you need to add expressions for cgi file and public_html that more specific that the default expression<b><code><font color=purple>" /home/[^/]*/((www)|(web)|(public_html))(/.+)?" </font></code></b>.
#*For public_html: <b><code><font color=green >semanage fcontext -at httpd_sys_script_exec_t "/home/[^/]*/public_html"</font></code></b>
#*For cgi files: <b><code><font color=green >semanage fcontext -at httpd_sys_script_exec_t "/home/[^/]*/public_html/.+\.cgi"</font></code></b>
1
edit

Navigation menu