Updated: 2017-10-13 02:19 EDT
Follow these directions to create your own web site on the Course Linux Server.
If you have problems or see any server errors in your web browser, such as Internal Server Error or Forbidden, see the section below titled Errors, Troubleshooting, and Logs.
public_html
index.html
www-data
and has group search permissions enabled. (If the group is wrong, talk to your professor to get it fixed.)public_html
in your HOME directory.public_html
to remove write permission for group and for other and enable search permission for other. (Do not change any other permissions! Directory mode rwxr-xr-x
is good.)public_html
your current directory.~idallen/cst8207/17w/cgi-bin/index.html
into the current directory. (There is a tilde character in that pathname.) Make sure the file is readable by others.http://cst8207.idallen.ca/~
abcd0001
where abcd0001
is replaced with your CLS userid. (There is a tilde character in that URL.)Your web browser should get no errors and you should see a web page with heading Your Name.
If you have server errors or other problems, see the section below titled Errors, Troubleshooting, and Logs.
index.html
file to put your own information in it:
abcd0001
with your Algonquin userid.Your Name
with your own name..htaccess
Options +ExecCGI
in file .htaccess
in the public_html
directory. (Word count: 1 2 17) Make sure the file is readable by others.Make sure you can still access the above web page without errors. If you have server errors or other problems, see the section below titled Errors, Troubleshooting, and Logs.
Choose the privacy settings for your web site.
If you have server errors or other problems, see the section below titled Errors, Troubleshooting, and Logs.
Open access to the Internet is the default setting for your web site. No further changes are needed to allow open access. By default, everyone on the Internet can see your web site.
Turning on Access Controls is optional. You don’t need to do this.
If you don’t want your web site to be visible on the whole Internet, turn on optional Apache Access Controls following these directions:
.htaccess
To turn on optional Access Controls, start by appending these four lines to the one-line .htaccess
file that you created above (and note there is no space after the comma):
Order deny,allow
Deny from all
Allow from 127.
Allow from .w3.org
If you enable optional Access Controls, you must permit Course Linux Server localhost access to your web site by allowing IP address prefix
127.
to access your site. You should permit W3C validation access to your web site; without this, the validation buttons won’t work.
To permit Algonquin College internal (private) addresses to see your web site, also append this line to your .htaccess
file (there are spaces between the two IP address prefixes):
Allow from 10. 192.168.
To permit other addresses or sites, append more Allow from
lines, giving the full or partial domain name or full or partial IP address. Multiple IP addresses or domains can be specified on the same line, separated by spaces, e.g.
Allow from 205.211. .algonquincollege.com
Allow from .teksavvy.com .rogers.com .bell.ca
Allow from 167.88.21.
If you do not allow localhost access via
127.
your web site cannot be viewed or tested by your instructor. You must allow access to127.
If you do not allow access from the
.w3.org
domain name, you will not be able to use the W3C validation buttons to validate your pages.If you do not allow your home IP address or domain name to access your web site, you will not be allowed to view your site from home.
Make sure you can still access your web page without errors.
If you have server errors or other problems, see the section below titled Errors, Troubleshooting, and Logs.
.htaccess
fileIndexBelow is a sample Restricted Access .htaccess
file with optional Access Controls enabled. Some of the Allow from
lines in your file may be different:
Options +ExecCGI
Order deny,allow
Deny from all
Allow from 127.
Allow from .w3.org
Allow from 10. 192.168.
Allow from 205.211. .algonquincollege.com
Allow from .teksavvy.com .rogers.com .bell.ca
Allow from 167.88.21.
You must permit access from 127.
and you should permit access from .w3.org
to allow W3C validation. Everything else is up to you.
Access Controls are optional. Your site will be visible to the entire Internet if you do not use any optional Access Controls.
If you have server errors or other problems, see the section below titled Errors, Troubleshooting, and Logs.
To upload an image, you need to install the uploading CGI program using the directions below.
If you have server errors or other problems, see the section below titled Errors, Troubleshooting, and Logs.
upload.html
upload.cgi
public_html
directory exists and has the correct permissions. (See above for the correct permissions.)public_html
your current directory.~idallen/cst8207/17w/cgi-bin/upload.html
into the current directory. Make sure the file is readable by others.~idallen/cst8207/17w/cgi-bin/upload.cgi
into the current directory. Make sure the file is readable and executable by others.upload.cgi
and add an upload password to the file. (Follow the instructions in the file.)Options +ExecCGI
is set in your .htaccess
file.http://cst8207.idallen.ca/~
abcd0001
/upload.html
where abcd0001
is replaced with your CLS userid.
PASSWORD=
in your upload.cgi
file.)The image file will be uploaded into your public_html
directory.
If you see any server errors in your web browser, such as Internal Server Error or Forbidden, see the section below titled Errors, Troubleshooting, and Logs.
If you have turned on optional Access Controls, make sure you permit access to your web site from your current IP address!
me.jpg
IndexIf you have turned on optional Access Controls, make sure you permit access to your web site from your current IP address!
If you have server errors or other problems, see the section below titled Errors, Troubleshooting, and Logs.
me.jpg
Upload a clear head shot picture of you into the file me.jpg
in your public_html
directory. (If you don’t have a picture, ask a friend to take one for you.) The head shot should show your face clearly.
The image must be no smaller than 300 pixels in height or width and no larger than 1024 pixels in height or width. The file size should be less than 1 MB.
The file must be a JPEG format image named me.jpg
and must be in your public_html
directory. (You can always rename a file on the CLS after you have uploaded it.) The file must have “other” read permission.
A clickable public montage of all the uploaded head-shot pictures is available at http://cst8207.idallen.ca/montage17w.cgi
This page is available to everyone on the open Internet. If you do not want your image shown on the montage page, follow the directions at the bottom of the page and then touch your photo to get the page to rebuild.
The montage17w.cgi
file is a shell script that builds the image file. You can log in and look at this shell script on the Course Linux Server using this pathname: /var/www/html/montage17w.cgi
If you see any server errors in your web browser, such as Internal Server Error or Forbidden, this section is for you.
www-data
with search permission for “group”.public_html
directory.
rwxr-xr-x
public_html
directory.
.html
files must be readable by “other”..cgi
files must be readable and executable by “other”.Allow from all
to your .htaccess
file to allow access from all IP addresses if you think this might be the problem.Here are two useful Apache web server log files on the CLS:
/var/log/apache2/error.log
/var/log/apache2/suexec.log
If you see any errors in your web browser, such as Internal Server Error or Forbidden, go back to the CLS command line and look at the last few lines in the Apache error log file /var/log/apache2/error.log
to see what went wrong and fix it.
If you see suexec policy violation
in the error log, look on the CLS at the last few lines in the suexec log: /var/log/apache2/suexec.log
for hints. (Did you correctly change the permissions of public_html
?)
Files that you want visible on your web site must have read permissions for other so that the web server can serve them. If you take away other read permissions, the files will be flagged as Forbidden.