Web

From COEHELP

Jump to: navigation, search

Contents

Web-Related questions

How do I set up my home page on the COE web server?

Any user with an account in good standing on the COE system can have a home page on the COE web server.

To set up your home page, log in to the system using ssh on a PC (Secure Shell, F-Secure) or at a COE Linux workstation in 274 SN and type setupwww. This will create a subdirectory called www in your home directory, set the correct permissions, and create a nearly-blank starter page for you. You may then edit your starter page and add other files (html, images, and so forth) to develop your site.

Your home page on the COE server is subject to our Acceptable Use Policy and to the Northeastern University AUP. Please review these policies before you start work on your home page.

In particular, sites that are in any way commercial or that grant usage of our systems to others are not permitted. For instance, a blog site that permits visitors to exchange files or send email through the COE servers would not be allowed on a home page.

Please note that installation of content-management systems such as Wordpress in COE personal home pages is not supported.

How much space do I have for my COE home page?

Your www directory is part of your home directory, which is subject to a disk quota. You can check your quota by typing quota -v at the command line while you are logged in to the system.

Your home directory provides you with space for your homework and academic projects, your saved email, and your web site. Keep in mind that the primary purpose of the system is academic!

How can I transfer files to my COE home page?

You can upload files to your home directory using SFTP, which stands for Secure File Transfer Protocol.

For SFTP file transfers, please connect to gateway.coe.neu.edu. Your web site is in the subdirectory www in your home directory.

What is my URL (web site address)?

The URL of your web site is: https://www1.coe.neu.edu/~username (put your username after the tilde character).

Using Perl and PHP on your COE web site

Ownership and Permissions: CGI scripts in your COE web site will be executed with your own user permissions ("suexec"). For the protection of your account, CGI scripts with unsafe ownership or permissions will not be executed by the web server. The script must be writable only by you, and it must be owned by your account and primary group.

Set the access permissions on your CGI script with the shell command:

   chmod 755 filename.cgi

Perl can be used to write CGI scripts in your COE web site. The correct path to perl is

   /usr/bin/perl

Your Perl CGI scripts must have an extension of .pl or .cgi. They can be placed anywhere in your www directory (you don't have to create a cgi-bin).

PHP

For security reasons, user web pages containing PHP are run as CGI scripts on the COE web server. This ensures that your script is executed with your own user permissions. We also use PHP in "Safe Mode", which places certain restrictions on what you can do in your scripts.

To get a PHP web page to work on your COE web site,

1. Your PHP pages must be writable only by you, and must be owned by your account and primary group.

2. You must make the file executable with the shell command:

   chmod 755 filename.php

Troubleshooting CGI assignments

  • If you edit your files on a Windows PC and transfer them to your COE account using ftp, be sure to use ascii mode (not the default binary mode) for the transfer. You can also use the Unix utility dos2unix to strip the DOS-style carriage returns from your files.
  • Check the ownership and permissions of your scripts.
  • Running your CGI scripts on the command line will often return error messages that you can't see when you load the file through a web browser. (Ignore error messages about missing input that will come from a web form.)
  • If your script connects to MySQL, be sure your database username and password are correct. Try connecting on the command line to be sure they work.
Personal tools