Omega -- Setting up Your Website
Setting up a website on Omega is extremely easy. All you need to do is create a directory called public_html inside your home directory, and copy all website related files into it or its subdirectories. There is a set of filenames that the Apache web server will read and send automatically when the web browser requests a directory (such as http://omega.cs.iit.edu/~<username> or http://omega.cs.iit.edu/~<username>/projects/). This list is, in order: index.html, index.shtml, index.php, and index.jsp. You should thus use of those as your introductory page's filename -- it will be the one loaded and displayed when someone asks for your website for the first time. It is also generally a good idea to have at least one "index" file in every one of your directories.
<username>@omega /somewhere $ cd ~ <username>@omega ~ $ mkdir public_html <username>@omega ~ $ cd public_html <username>@omega ~/public_html $ joe index.htmlOne issue you will have to deal with is setting correct permissions on files and directories you make available on the web. Fortunately, you will usually only have to set these when you first create your website - a default, sufficient set of permissions will be used from then on, and you will have to modify it only for executable CGI scripts and certain directories.
The following are the general guidelines:
<username>@omega ~/public_html $ chmod 711 directory <username>@omega ~/public_html $ chmod 755 cgi.pl <username>@omega ~/public_html $ chmod 644 index.phpOne last thing, and probably the most important one, concerns the public_html directory itself. If you'd like to prevent other Omega users from seeing your files (including those containing actual source code, such as Perl and PHP scripts) as they sit on the server (as opposed to only after they were processed by the web server and displayed in a web browser), you will need to change the group ownership and some of the permissions of the directory. Remember, if you are working on a class assignment, you are responsible to follow this step and prevent your classmates from obtaining your work! In order to do so, issue the following commands:
<username>@omega ~ $ chweb public_html <username>@omega ~ $ chmod 710 public_htmlIf you'd like to use Java Servlets and JSPs on your website, a Context will have to be created for you within Tomcat's configuration file. Go to the Create a Tomcat Web Application page to create one. If you decide to place your JSPs and servlets in public_html, the permissions on your public_html directory and on the WEB-INF directory need to be 750 instead of 710.
Once everything is set up, you can either write your web pages directly on Omega using a text editor (like joe), put them together on your desktop and upload them to Omega using WinSCP (see the Connect HOWTO for details), or map your home directory using Samba and access your files directly (the Connect HOWTO will help you with this, as well).