undcemcs02.und.edu .public_html” under the Root Directory.mkdir:
undcemcs02> mkdir ~/public_html
where the symbol ~ is the user’s root in the Linux file system.
chcon .undcemcs02.
Otherwise, your CGI scripts will not work.
undcemcs02> chcon -R -t httpd_user_content_t \ /home/”USER.ID”/public_htmlSwap out “USER.ID” with your login name:
undcemcs02> chcon -R -t httpd_user_content_t \ /home/first.lastname/public_html(or replace the above two commands by the following two commands:
undcemcs02> chcon -R -t httpd_user_content_t /home/”USER.ID”/public_html
undcemcs02> chcon -R -t httpd_user_content_t /home/first.lastname/public_html
where the backslash symbol ‘\’ is used to continue the current command to the next line.)
public_html directory.
An example script is ~/public_html/test.html.undcemcs02> chmod 755 ~/../user.id undcemcs02> chmod 755 ~/public_html/ undcemcs02> ls -all ~user.id/public_html/ total 104 drwxr-xr-x 2 userid cslinux 4096 Jan 5 2017 ./ drwxr-xr-x 67 userid cslinux 4096 Mar 13 2016 ../ -rw-r--r-- 1 userid cslinux 4854 Nov 20 2014 a.out -rw-r--r-- 1 userid cslinux 5977 Jan 5 2017 index.html -rwx------ 1 userid cslinux 227 Nov 20 2016 test.html undcemcs02> chmod 755 ~user.id/public_html/test.html undcemcs02> ls -all ~user.id/public_html/ total 104 drwxr-xr-x 2 userid cslinux 4096 Jan 5 2017 ./ drwxr-xr-x 67 userid cslinux 4096 Mar 13 2016 ../ -rw-r--r-- 1 userid cslinux 4854 Nov 20 2014 a.out -rw-r--r-- 1 userid cslinux 5977 Jan 5 2017 index.html -rwxr-xr-x 1 userid cslinux 227 Nov 20 2016 test.htmlwhere
user.id is your Linux account identifier.
public_html directory.
~/public_html/test.html,http://undcemcs02.und.edu/~user.id/test.html
public_html is not in the address.
|
The fool doth think he is wise, but the wise man knows himself to be a fool. ― William Shakespeare, As You Like It |