Spring 2002 CSCI 571 Homework 6
Homework 6
The changes I made to the httpd.conf in order to fulfill the requirement
- LockFile /var/tmp/httpd.lock
- MinSpareServers 2
- MaxSpareServers 3
- StartServers 2
- MaxClients 3
- Port 9088
- ServerAdmin kiyoungy@usc.edu
- DirectoryIndex mydefault.html
- ScriptAlias /scripts/ "/home/scf-04/kiyoungy/csci571/apache/scripts/"
- <Directory "/home/scf-04/kiyoungy/csci571/apache/scripts">
AllowOverride All
Options None
Order allow,deny
Allow from all
</Directory>
- # IndexOptions FancyIndexing (comment out)
I have done the following in fulfilling the requirements.
- create a file, mydefault.html in /home/scf-04/kiyoungy/csci571/apache/htdocs
<HTML>
<TITLE> My Default Page </TITLE>
<BODY> This is my default page. </BODY>
</HTML>
- mkdir /home/scf-04/kiyoungy/csci571/apache/scripts
- chmod 755 /home/scf-04/kiyoungy/csci571/apache/scripts
- create a file, .htaccess in /home/scf-04/kiyoungy/csci571/apache/scripts
Satisfy All
AuthUserFile /home/scf-04/kiyoungy/csci571/apache/.htpasswd
AuthGroupFile /dev/null
AuthName ByPassword
AuthType Basic
<Limit GET>
require user csci571
</Limit>
- create a file, .htpasswd in /home/scf-04/kiyoungy/csci571/apache
htpasswd -c /home/scf-04/kiyoungy/csci571/apache/.htpasswd csci571
- cp printenv from cgi-bin to scripts
For PHP
- $APACHE_HOME/bin/apxs has some problems, and modified as in
here
- make install fails, but libphp4.so is created. copied libphp4.so to $APACHE_HOME/libexec
- moved $PHP_HOME/tests to $APACHE_HOME/htdocs
- add the following to $APACHE_HOME/conf/httpd.conf
AddType application/x-httpd-php .php .php4 .phtml
LoadModule php4_moudle libexec/libphp4.so
AddModule mod_php4.c
ScriptAlias /php/ /path/to/your/apache/htdocs/php/
For Tomcat
- apxs -c *.c failed, and didn't create mod_jserv.so. Manually
created mod_jserv.so with the following command
ld -G -o mod_jserv.so *.o
- Modify the port
<Http10Connector port="9288"
secure="false"
maxThreads="100"
maxSpareThreads="50"
minSpareThreads="10" />
<Ajp12Connector port="9488" />
- comment out the following
<Ajp13Connector port="8009" />
- Modify the ApJServDefaultPort to 9488 in $TOMCAT_HOME/conf/jserv/tomcat.conf
- Append the following to $APACHE_HOME/conf/httpd.conf
include "$TOMCAT_HOME/conf/jserv/tomcat.conf"
You can e-mail me at:
kiyoungy@usc.edu
The University of Southern California does not screen or control the content on this website and thus does not guarantee the accuracy, integrity, or quality of such content. All content on this website is provided by and is the sole responsibility of the person from which such content originated, and such content does not necessarily reflect the opinions of the University administration or the Board of Trustees