Every LabraNet user has public_html folder under his/her home folder.

To publish websites, first you have to modify some rights of your homefolder.
[userid@student userid]$ chmod 701 /home/userid

This command gives only the execute permission to others.
[userid@student userid]$ chmod 705 /home/userid/public_html

With the above command you allow others to read and execute your public_html folder.
touch /home/userid/public_html/index.html

Now you should see an empty page @ http://student.labranet.jamk.fi/~userid

For PHP functionality check instructions in .htaccess -file under public_html. More information can be found in instructions-directory in your home folder.

Troubleshooting

Check that the SELinux context type is set to “httpd_user_content_t” for all files and folders under the public_html folder. This can be done using the “ls -laZ” command:

$ ls -laZ ~/public_html/
drwx—–x. user Student-users unconfined_u:object_r:httpd_user_content_t:s0 .
drwx—–x. user Student-users unconfined_u:object_r:user_home_dir_t:s0 ..
drwxr-xr-x. user Student-users unconfined_u:object_r:httpd_user_content_t:s0 folder
-rw-r–r–. user Student-users unconfined_u:object_r:httpd_user_content_t:s0 file

Context can be set to correct type by running the following command:

chcon -R -v -t httpd_user_content_t ~/public_html/*