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_sys_script_exec_t \ /home/”USER.ID”/public_htmlSwap out “USER.ID” with your login name:
undcemcs02> chcon -R -t httpd_sys_script_exec_t \ /home/first.lastname/public_html(or replace the above two commands by the following two commands:
undcemcs02> chcon -R -t httpd_sys_script_exec_t /home/”USER.ID”/public_html/cgi-bin
undcemcs02> chcon -R -t httpd_sys_script_exec_t /home/first.lastname/public_html/cgi-bin
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.
“It is better to remain silent at the risk of being thought a fool, than to talk and remove all doubt of it.” ― Maurice Switzer, Mrs. Goose, Her Book |