Tux Web Services
The Tux ecosystem has several web services available, designed to meet different needs for academic coursework. Their general usage is explained below.
(accessible from anywhere in the world)
Plain HTML and PHP:
Plain HTML sites with PHP can be served directly from the Tux web server, www.cs.drexel.edu (a new alias will be coming shortly with more CCI-inclusive naming). This is an Apache web server, which loads any information in your home directory under the public_html directory. This directory must be world readable and executable (eg 755 permissions) in order for the web server to serve the content from it. Also, your Tux home directory must be world executable (711 permissions) in order for the web server to have permission to see your public_html folder. To access these sites, navigate to https://www.cs.drexel.edu/~abc123, where abc123 is your Drexel username.
To run cgi-bin applications using PHP, place the appropriate files in public_html/cgi-bin. These can be accessed at https://www.cs.drexel.edu/~abc123/cgi-bin/, where abc123 is your Drexel username.
(only available on campus or through VPN)
CCI hosts several databases. Currently, available options are MariaDB and MongoDB. Other database systems may be developed, depending on course requirements.
Currently, all database access must be granted on a per-user level, with dedicated login information. Professors may request access for their students at least two weeks before the start of the term in which they are needed, and individuals may request access for class projects with approval from their professor. Requests should be sent to email@example.com and include the subject line "Request for database - course #". Please indicate which database type you would like when requesting the database, and provide an indication as to when the database will no longer be needed. Typically, this will be assumed to be the end of the term.
Jupyterhub is provided as a way of running Jupyter notebooks. To use Jupyterhub, you must first log in to the Jupyterhub server over SSH - from Tux, you can just type "ssh jupyterhub" and you should connect automatically and be prompted for your Tux password. Once you've connected, you can access the web interface at https://jupyterhub.cci.drexel.edu and login with your Tux credentials. Within Jupyterhub, you can choose which notebook to open from your home directory.
Here you can find more detailed instructions on how to connect to Jupyterhub.
Node.js and Python app port numbers:
For Node and Python sites, a port number must be assigned to your app. To get a port number, visit https://www.cs.drexel.edu/~bjb344/portman.php
Node is available on node.cci.drexel.edu. Sites are managed through pm2, a production-grade Node.js server, which can track changes in files, automatically restart services, remain running when logged out, and provide centralized logs.
To start a Node application, log in via SSH to node.cci.drexel.edu (either through VPN or through Tux) and cd to the directory where your node application lives. Once there, you can run the command
pm2 start <<app-name.js>>
You can append the option --watch to have pm2 monitor the file for changes, allowing you to edit your code on Tux and it should automatically reload when you save your changes. To see logs, run the command
To exit the log viewer, type ctrl-c.
When you're done with your project, please run the command
pm2 stop <<app-name.js>>
to stop running your app.
Python apps/frameworks (uWSGI)
Python apps and frameworks with a uWSGI interface can be run on the uWSGI server, temporarily hosted at bvm48.cci.drexel.edu.
To create a uWSGI site, create a directory inside your public_html directory on Tux called "uwsgi". Inside of this directory, make an INI file like the following. Replace <<PORT>> with the port number you've been assigned by your professor, or gotten by visiting https://www.cs.drexel.edu/~bjb344/portman.php. Replace abc123 with your username, and project.py with the name of your main Python file.
[uwsgi] http-socket = 10.246.250.148:<<PORT>> chdir = /home/abc123/public_html/uwsgi/ wsgi-file = project.py processes = 4 threads = 2
To access your site, you'll need to be connected to VPN. Then, visit http://bvm48.cci.drexel.edu:<<PORT>>, where <<PORT>> is the port you specified in the ini file you created above.
For more information, visit https://uwsgi-docs.readthedocs.io/en/latest/WSGIquickstart.html. This includes instructions on making ini files for specific frameworks.