Changes

Jump to: navigation, search

SRA840 Lab5

86 bytes added, 01:39, 24 February 2009
no edit summary
== Gregory Masseau ==
Upon first attempting to install Apache, I chose Apache 2.2. This worked fine, and the installation of itself went alright - problems only occured when I attempted to build mod_python. It appears the version of mod_python included in the ports collection expects Apache 1.3. So, I went back, removed 2.2, and installed 2.1
After this, the next hurdle was that mod_python expects a single-threaded Python runtime, however, the default in FreeBSD is a threaded runtime. So, it was necessary to deinstall the Python 2.5 port, set the WITHOUT_THREADS environment variable to 1, and rebuild/reinstall Python, after which mod_python will happily build and install.
mod_perl, on the otherhand, was a relatively smooth install, and required nothing beyond just the standard 'make install distclean'. All it's dependencies were present and in a working state by default.
After the software is installed, it is necessary to set the server's name, both by adding the line 'ServerName "fbsd"' to the Apache configuration file at /usr/local/etc/apache/httpd.conf, as well as the line '127.0.0.1 fbsd' into /etc/hosts. After this, the Apache server starts succesfully.
The final hurdle was correcting the provided CGI scripts to behave properly in the CGI environment. It was neccesary to add the line: 'print "Content-Type: text/html\n\n";' to the Perl script and the line 'print "Content-Type: text/html\n"' to the Python script. After these changes, both scripts ran as expected, producing correct output. It would be nice to have a version of mod_python in ports that works properly with Apache 2.2.

Navigation menu