PHP Deployment (CS)

This is a short introduction to help you deploy your PHP programs on the CS server.
(Please let me know if you find any errors or omissions in the document —Upsorn Praphamontripong, 28-September-2023)

If your CS account does not work, please send an email to cshelpdesk@virginia.edu including your computingID and the error message(s) you received.


Connect to the CS server

To connect to the CS server, you may use any SSH/FTP-like approach of your choice. Alternatively, you may use any FTP software such as FileZilla and Cyberduck.

To upload and deploy your web resources, use the following setting:
  • Hostname: portal.cs.virginia.edu
  • Protocol: SFTP
  • Port: 22 (by default)
  • Username: your computing ID
  • Password: the password you received from cshelpdesk
    • Note: this password is different from the password you use to connect to CS phpMyAdmin. You should have received 2 sets of credential from CS helpdesk: one for phpMyAdmin, one for web server. To deploy your web resources, you need the password for the web server.
    • If you have not received an email from cshelpdesk, or don't know (or forgot) your password, please try to reset the password.
    • To reset the password, use https://www.cs.virginia.edu/PasswordReset/
  • Folder: public_html
    • Note: this folder was created by the CS helpdesk. Do not re-create it. You will later put all of your web resources in this folder)

Deploy an app

  1. Create a blank file named  helloworld.php. Paste the following contents in the file
    <?php echo "Hello World @^_^@" ?>
  2. Upload your  helloworld.php  file to the CS server. Put the  .php  file under  public_html

Access an app

To access your app, open a web browser and enter a URL similar to
    http://www.cs.virginia.edu/~your-computingID/path-to-your-file/helloworld.html, or
    http://www.cs.virginia.edu/~your-computingID/path-to-your-file/helloworld.php

Note: do not put public_html in your URL, the path-to-your-file should be the folders inside the public_html folder


Copyright © 2023 Upsorn Praphamontripong

Released under the Creative Commons License CC-BY-NC-SA 4.0 license.

Last updated 2023-09-28 15:54