Crux is the student server for Baker College. You may also hear it referred to as the student UNIX server or the student web server. Below is a list of questions you may have.
GET method work, but the POST method does not?
Crux runs an Apache HTTP server to serve web content. The content can range from pictures and HTML files to complex web applications. Every user has a unique directory on Crux in which to place their web content and a unique URL with which to access it.
Crux uses per-user web
directories. What this means is that your web content is
contained within a directory called "public_html" located in
your UNIX home directory. The URL to access your web page is
https://crux.baker.edu/~username/ where username is
the user ID you use to log in to
Crux,
Blackboard, and
Webmail.
As an example, the URL
https://crux.baker.edu/~example/hello.html
corresponds to the file /home/example/public_html/hello.html
within Crux's filesystem. So if you login to Crux and type
cd /home/example/public_html lsat the command line, you will see the file that Apache just served you.
To upload web content, you will need a Secure File Transfer Protocol (SFTP) client. This will allow you to transfer files between your computer and your web directory. You can download an SFTP client from Baker's software download page. For instructions on using this SFTP client, please refer to the Using SSH and SFTP page.
Place the files you want to make available on the web in the
public_html directory located in your home
directory. Only files within (or above) this directory are
accessible from the web. For example, if your user name was
"example", then you would place your files in the
/home/example/public_html/ directory.
top
Within ~/public_html is a directory called protected.
Only you and the faculty have access to this directory. Anyone attempting
to access content within this directory will need to authenticate. In other
words, when you point your browser at
https://crux.baker.edu/~username/protected/, you will
be prompted for a user name and password. Only those users with the
appropriate access will be allowed to view the page.
top
Crux allows you to run CGI scripts to
create dynamic web content. Any file located in the
~/public_html/cgi-bin or ~/public_html/protected/cgi-bin
will be treated as a CGI script. The script must also have the execute
permission set. For example, from the command line, type:
cd ~/public_html # go to your cgi-bin directory [ ! -d cgi-bin ] && mkdir cgi-bin # create a cgi-bin if it doesn't exist cd cgi-bin cat<<EOD > test.pl # create a simple Perl script #!/usr/bin/perl print "Content-type: text/html\n\nHello World!"; EOD chmod +rx test.pl # set the read and execute permissionsTo see the newly created CGI script in action, go to
https://crux.baker.edu/~username/cgi-bin/test.pl
where username is the user name you use to login to Crux.
An Internal Server Error occurs when your CGI script fails to produce valid HTTP output. Some common causes are:
Content-type: text/html <html> ... [the rest of your HTML output] .. </html>Notice the colon (:) and single space between
Content-type and text/html, and the blank
line between the HTTP header and the HTML output.GET method work, but the POST method does not?
Make sure that the action attribute of your form is
pointing to https://crux.baker.edu/... and not
http://crux.baker.edu/...
Crux's web server forces secure connections by redirecting HTTP
requests to HTTPS. When that occurs, some browsers "forget"
what method the form was suppose to be submitted in and send a GET
request instead. To avoid this, set the form's action to
https://crux.baker.edu/... so it won't be redirected.
You can see this problem in action by go to the
form test page.
top
Crux runs on Linux, which is a UNIX-like operating system. Every user is given a shell account that they can log into. The only way to access it is through Secure Shell (SSH).
In order to login to Crux, you need a Secure Shell (SSH) client.
You can download one from Baker's software download page
For instructions on using this SSH client, please refer to the Using SSH and SFTP
page.
top
Crux places you in your home directory when you log in. If you ever get lost or need to return to your home directory, on the command line you can type
cd ~and press enter. The tilde (~) is UNIX shorthand for your home directory. To find out where your home directory is actually located, type
echo ~at the command line and press enter.
Crux runs a MySQL database server. For security, it is behind Crux's firewall, which means it cannot be accessed directly from the internet. It can only be accessed through another program that is already running on Crux, such as Apache or Secure Shell.
Each user has single database on which they are granted all privileges. Creating more databases is not allowed.
To log into MySQL, you first need to log into Crux via SSH. At the command line type
mysql -u ${USER} -p ${USER}_db
and enter your MySQL password at the prompt.
Note: your MySQL password is different and independent from the
password you use to log into Crux.
To use the MySQL Query Browser with your database on Crux, you need to
set up a tunnel through SSH and then connect the Query Browser to the
local end of the tunnel. Please see the
MySQL Query Browser Secure
Connection via a SSH Tunnel to Crux for a detailed instructions.
top
Crux will ONLY deliver email to Baker (@baker.edu) email
addresses. All other mail will be rejected. The reason for
this restriction is to prevent SPAM from originating on Crux which can
result in the entire baker.edu domain being blacklisted.
top