Getting Old Websites working again
In May of 2008, Mechanical Engineering completed the migration for the old
Apache 1.3x based web servers to a centralized Zope/Apache 2.x based web
cluster. If pages were not migrated prior to this change, then they stopped
working. The only way to get these sites back up is to migrate them to the new
Requesting new site space
Send the request for the new/existing site to the E-shop (firstname.lastname@example.org)
Requests should include:
- Name of site, username, lab name, lab group or course
System to host site (zope or apache, undergrads only can use apache)
- If this is an entity, a ME faculty or staff member must approve the request
2) If its an Apache based site, a file space will be available in the web
share on ME servers (tools and widget). This share has three root
directories, 'me', 'entities' and 'users'. Undergraduates will have space in
the 'me' folder, other person accounts will be in the 'users' space and all
non-person accounts will be in the 'entities' space. This share will be
available on all of the ME windows lab computers as the 'W' drive. Once you
have located your directory, simply place your content in this folder
to post it. This folder is also available in the ME/ECN UNIX environment in
the path \web.
Zope vs. Apache 2
When you migrate your site(s), you will be asked to choose between Zope and Apache.
The Apache option is an upgraded version of the old web services. Zope is a true content management
system. The Zope server as an option requires more effort to migrate but can
provide many more features such as Wiki's, Surveys and database connection with
very little development time. Undergraduate students must use the Apache
2.0 based server.
How can I access the new web space
The new space given for your web site can be accessed in many ways. The
actual file system is available on all UNIX and Linux machines in the path
Additionally, you can do a 'Map Network Drive' to this path
- Faculty, Staff and Graduate students will find their directory under
- Undergraduate Students will find their directory under 'me'.
- Non-person accounts will find their directory under 'entities'.
- Non-person accounts with virtualhost configuration will find their directory under 'group'.
IE - web accessible files
How do I create a web site
Fundamentally, a website is nothing more than a collection of HTML files.
These can be static files that end in html or dynamic content using scripts or
programs to generate HTML pages on request. Given this, to create a website, you
need to create an html document. Save this document as index.html and place it
in your web space. Now, you have a web site.
The new Apache server does not require a public-web directory. The file space you will be given is the root of your
web space. If you use 'templeton', the root of the web space will be the 'public_html'
directory. Templeton provides access to logs and a private directory space as
Permission Denied Errors when accessing files
The web server is a UNIX based system. In the process of placing files, especially when using a PC or Mac, the access permission can be
set incorrectly. To correct these, you will need to open a command prompt on tools and use the 'chmod' command.
To be web accessible, a file must be world readable or be set to the UNIX group
www and group readable. For a directory to be accessible, it must either be
world readable and executable or have its UNIX group set to www and have the
group read and execute permissions set.
EXAMPLE: Making A file (index.html) and Directory (sp3)
accessible for user loganm
tools: cd /web/users/loganm
tools: ls -la
-rwx------ 1 loganm other 67 Oct 26 2009 index.html
drwx------ 2 loganm other 3 Jan 28 20:36 sp3
tools: chmod 744 index.html
tools: chmod 755 sp3
tools: ls -la
-rwxr--r-- 1 loganm other 67 Oct 26 2009 index.html
drwxr-xr-x 2 loganm other 3 Jan 28 20:36 sp3
Using htaccess control files - 'dot htaccess' or '.htaccess'
If you plan to use access control, CGI files or other more complex options in your website, you may need to use a 'dot htaccess' file (.htaccess).
This is a specifically named file that has a period as the first character. These files
MUST be created and edited under UNIX to work correctly. Windows/Dos uses
a different text file format which when used in UNIX, appends ^M characters to
each line. This WILL break your website. Available editors include vi,
pico and emacs. If not familiar with their use - use a search engine such as
Google to find a suitable online tutorial.
Index.htm and specifying the default page to load in a Directory
On the new Apache server, the default index page for a directory is index.html or index.php. If you wish to use a
different file name for the default page, you will need to specify it in your .htaccess file. An example file is given
below for the file index.htm.
EXAMPLE: .htaccess file for index.htm as default page
Posting Office 2007 XML Documents
If you are prompted to open/save a compressed zip file when posting Office 2007 documents, you will need to add this mime type definition on the server in your sites .htaccess file.
EXAMPLE: .htaccess file for Office 2007 Documents
ADDTYPE application/vnd.openxmlformats docx pptx xlsx
Enabling CGI programs
The mechanisms for using active content may differ somewhat from the old web
At this time, the Apache 2 based machine does not support mod_perl based
scripts or extensions. Perl is still available but it will not have access to
dynamic server modules as before. Also, to use CGI, perl and pythons programs, you must add
information to the your .htaccess file. Below is an example of a file to allow cgi scripts with the .pl and .cgi extensions.
EXAMPLE: cgi and pl file extensions for active content
(placed in the .htaccess file)
AddType application/x-httpd-cgi .pl
AddType application/x-httpd-cgi .cgi
Many sites have areas or directories that you wish to have protected
from the unknown viewer. In these cases, our apache web server offers two
options to protect directories of information, I2A2 (career account) authentication and the generic Apache basic Authentication.
Both of these options are implemented using a file in the web directory named .htaccess
This file MUST be created and edited on the UNIX system. If you use
Windows to create, edit or modify this file, it will cause a server error when
the page is requested.
Detailed information for I2A2 Authentication can be found
here. The Basic Authentication module is implemented using standard Apache
mechanisms and documentation can be found
here. ECN has
made a small customization which required an 'AuthBasicProvider' directive for
basic authentication to work. Be sure to include that if you use basic
EXAMPLE: .htaccess file for I2A2 authentication
# Require Specific logins to have access
require i2a2-user loganm
EXAMPLE: .htaccess file for Basic Authentication
# Configure the ECN Apache Server to use Basic Authentication
# Standard Apache Basic Authentication Commands
AuthName "MECL Basic Authentication Protected Site"
require user meclmember mecladmin
Sometimes, you may wish
to redirect portions of you website to other portions of your site to the other
sites completely. We offer a few methods to do this. The first is an
automatic redirect and does not prompt the user or change the displayed URL. The
second offers a page to let you know a site has moved and will re-write the
displayed URL. The choice of mechanism is up to the
EXAMPLE: index.cgi file placed in a subdirectory for direct site redirection
with no delay or URL rewriting. (Be sure to Enable CGI
scripts and set the correct Directory Index)
echo Location: https://engineering.purdue.edu/MECL/
EXAMPLE: index.html placed in old web directory for displaying a notice page prior to page redirection
<meta http-equiv="refresh" content="5; url=https://engineering.purdue.edu/~loganm">
<h1>This page has moved and you will be automatically redirected in 5 seconds</h1>
Mod Perl is not available on the new Apache 2 web server.
PHP is available and fully configured on the new Apache server. Many modules are installed and loaded by default and and page
ending in .php will automatically be processed and interpreted as PHP. (unlike other CGI scripts)
Page wrappers are supported but require a slightly different configuration to work correctly. Please reference
for directions on enabling page wrappers on your site.
Undergrad Web Services
has purchased a dedicated machine named silk.ecn.purdue.edu to provide web space
specifically for undergraduate students. This machine is configured identically
to charlotte.ecn.purdue.edu as an Apache 2.0 server. User web space is available
using this URL: