- Check the HTML Help Pages.
- Apply for a UND Engineering Linux Account.
- Use VPN (Virtual Private Network) to connect to the UND networks.
You may not need to do this if you are on campus.
- Log in to the Linux server
undcemcs02.und.edu
.
- Create a sub-directory “
public_html
” under the root directory.
Create the directory by using the command mkdir
:
shell> mkdir ~/public_html
where the symbol ~
is the user’s root in the Linux file system.
- Execute the command
chcon
.
If you are using CGI (Common Gateway Interface), execute the following command at the server undcemcs02
.
Otherwise, your CGI scripts will not work.
shell> chcon -R -t httpd_sys_script_exec_t /home/“USER.ID”/public_html
Swap out “USER.ID” with your login name:
shell> chcon -R -t httpd_sys_script_exec_t /home/first.lastname/public_html
- Create an HTML script.
Create/edit an HTML script in the public_html
directory.
An example script is ~/public_html/test.html
.
Check the HTML Tutorial for how to write HTML scripts.
- Open the HTML script.
This step is NOT needed if the default permission of files is open or the web server is the script’s owner:
Otherwise, open the HTML scripts to let the browser access them by using the command chmod
:
shell> chmod 755 ~/../user.id
shell> chmod 755 ~/public_html/
shell> 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
shell> chmod 755 ~user.id/public_html/test.html
shell> 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.html
where user.id
is your Linux account identifier.
†Note that the above commands may not be complete. You have to open all the files and folders in the public_html
directory.
- View the HTML script on a browser.
You can then check the HTML script on the browser.
For the example of the HTML script ~/public_html/test.html
, the page is at the location or URL:
http://undcemcs02.und.edu/~user.id/test.html
†Note that the directory name public_html
is not in the address.