發表文章

目前顯示的是 9月, 2009的文章

解放 USER public_html

啟動 SELinux 後的限制。 即使設定 /etc/httpd/conf/httpd.conf 中 UserDir public_html, 外界還是無法瀏覽個人網頁(Forbidden 403)。解決方式如下: Q: How do I make a user public_html directory work under SELinux? A: This process presumes that you have enabled user public HTML directories in Apache HTTP configuration (/etc/httpd/conf/httpd.conf). This process only covers serving static Web content. For more information about Apache HTTP and SELinux, refer to http://fedora.redhat.com/docs/selinux-apache-fc3/ . 1. If you do not already have one, you will need to create the public_html directory and populate it with the files and folders to be served. cd ~mkdir public_html cp /path/to/content ~/public_html 2. At this point, httpd is configured to serve the contents, but you will still receive a 403 forbidden error. This is because httpd is not allowed to read the security type for the directory and files as they are created in the user's home directory. To solve this, change the security context of the folder and its conten...