## Forum archive 2000-2006

### Quoc Nguyen - webwork installation and configuration

by Arnold Pizer -
Number of replies: 0
 webwork installation and configuration topic started 12/18/2006; 6:40:41 PMlast post 12/19/2006; 4:58:00 PM
 Quoc Nguyen - webwork installation and configuration  12/18/2006; 6:40:41 PM (reads: 160, responses: 7) Hi john, I have problem in config the webwork on my local system, which run on Linux, Apache2.055, mod_perl-2.03, perl5.8.7 and PHP5 I've got the sources code and documentation on http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/WebHome after getting the webwork source code, I run bin/check_modules.pl. It looks OK(all modules installed!)I want a URL looks like: http://webwork.ucmrced.edu so I have the webwork2 directory @ /opt/webwork/webwork2 and so pg: /opt/webwork/pgChange in global.conf$webwork_url = "/";$webwork_htdocs_url = "/webwork2_files";$webwork_courses_url = "/webwork2_course_files"; Change on Apache: httpd.conf ServerAdmin ccb_info@ucmerced.edu ServerName webwork.ucmerced.edu ServerAlias webwork #DocumentRoot /var/empty DocumentRoot /opt/webwork/webwork2 #ScriptAlias /cgi-bin/ /opt/webwork/webwork2/cgi ErrorLog /opt/webwork/logs/error-log CustomLog /opt/webwork/logs/access-log commonDoes any one have any idea what wrong on my configuration? Thanks -Q <| Post or View Comments |>  John Jones - Re: webwork installation and configuration 12/19/2006; 10:27:39 AM (reads: 175, responses: 0) Hi, It looks like you are trying to configure the top level page http://webwork.ucmerced.edu to be the one which has the automatic course listing. Normally, this would be at http://webwork.ucmerced.edu/webwork2. I don't know if this is possible, but it is likely related to your problem. I would change$webwork_url back to the more standard value of "/webwork2". There may be a corresponding change in your apache configuration. In an earlier e-mail, you had asked about my site's configuration/setup. I realize now you may have been thinking specifically of our top level page http://webwork.asu.edu. That page is not generated by webwork. That page is essentially created by hand. The top/left/bottom are copied from another page to make this page match the other department web pages, and the big table in the middle is editted by hand every semester. John <| Post or View Comments |>

 Quoc Nguyen - Re: webwork installation and configuration  12/19/2006; 12:14:34 PM (reads: 172, responses: 0) Hi John, if the URL like http://webwork.ucmerced.edu/webwork2. and the global.conf is # URL of WeBWorK handler.$webwork_url = "/webwork2";# Root directory of PG.$pg_dir = "/opt/webwork/pg";# URL and path to htdocs directory.$webwork_htdocs_url = "/webwork2_files";$webwork_htdocs_dir = "$webwork_dir/htdocs";# URL and path to courses directory.$webwork_courses_url = "/webwork2_course_files";$webwork_courses_dir = "/opt/webwork/courses"; webwork.apache2-config ...# Set this variable to the path to your WeBWorK installation.my$webwork_dir = "/opt/webwork/webwork2";... Do I need to add "Include /opt/webwork/webwork2/conf/webwork.apache-config" line to main Apache Conf httpd.conf? What do I need to change on httpd.conf file? Thanks, -Q <| Post or View Comments |>

 Davide P. Cervone - Re: webwork installation and configuration  12/19/2006; 12:47:37 PM (reads: 166, responses: 0) You definitely DON'T want to set the DocumentRoot to be the webwork directory. In fact, if you are using this server only for WeBWorK, you can leave it /var/empty. All the pages for WeBWorK are generated dynamically, so the DocumentRoot never comes into play. If you change it to /opt/webwork/webwork2, that means you are allowing your server to send the files in those directories to any user (including, for example, the configuration files that include your mysql passwords, and so on). If you really want the top level page for the server to be the webwork course-selection page, you can do that by using a line like  Redirect permanent /index.html http://webwork.ucmrced.edu/webwork2/  As for apache's configuration file, you need to add  Include /opt/webwork/webwork2/conf/webwork.apache2-configto httpd.conf (note that you need the apache2 version, not the apache version that you indicated in your message). Also, make sure that you have followed the instructions in the Twiki that you cite above. Apache2 has to be compiled with specific options set, and it may not work with an out-of-the-box apache2 distribution. I haven't set up an apache2 installation, so I can't help much with that. Davide <| Post or View Comments |>

 Quoc Nguyen - Re: webwork installation and configuration  12/19/2006; 1:22:44 PM (reads: 168, responses: 1) Thanks Davide, I am using Apache/2.0.55 (Unix) PHP/5.1.2 mod_perl/2.0.3 Perl/v5.8.7 on Linux OS. There are two sites running on this server and using one IP address so that I have to use VirtualHost to set up. conf/httpd.conf...... ServerAdmin ccb_info@ucmerced.edu ServerName ccb.ucmerced.edu ServerAlias ccb DocumentRoot /usr/www/server/ccb/html ScriptAlias /cgi-bin/ /usr/www/server/ccb/cgi-bin/ ErrorLog /var/log/apache2/ccb-error-log CustomLog /var/log/apache2/ccb-access-log common ServerAdmin ccb_info@ucmerced.edu ServerName ccb.ucmerced.edu ServerAlias ccb DocumentRoot /usr/www/server/ccb/html ScriptAlias /cgi-bin/ /usr/www/server/ccb/cgi-bin/ ErrorLog /var/log/apache2/ccb-error-log CustomLog /var/log/apache2/ccb-access-log common Now come with webwork. I want to have the URL looks like either http://webwork.ucmerced.edu or http://webwork.ucmerced.edu/webwork2/ What do I need to change on http.conf file? If I add this on httpd.conf ServerAdmin ccb_info@ucmerced.edu ServerName webwork.ucmerced.edu ServerAlias webwork DocumentRoot /var/empty ErrorLog /opt/webwork/logs/error-log CustomLog /opt/webwork/logs/access-log commonThe http://webwork.ucmerced.edu static work.Now I like http://webwork.ucmerced.edu/webwork2/What do I need to do on the httpd.conf file? I have the global.conf file: ( http://qsb.ucmerced.edu/ww-config/webwork2/conf/global.conf) and the webwork.apache2-config: http://qsb.ucmerced.edu/ww-config/webwork2/conf/webwork.apache2-config If the URL is http://webwork.ucmerced.edu/webwork2/ what would be a right configuration? Any help would be very appreciated! Thank you very much. Cheers, -Q <| Post or View Comments |>

 Davide P. Cervone - Re: webwork installation and configuration  12/19/2006; 2:16:56 PM (reads: 191, responses: 0) I've never used virtual hosting, but I think that all you should need to do is include  Include /opt/webwork/webwork2/conf/webwork.apache2-configin the httpd.conf file. It may need to be inside the VirtualHost directive, but I'm not sure. The links to your global.conf and webwork.apache2-config files didn't work for me, so if you were trying to let us access your configurations, I wasn't able to do so. Davide <| Post or View Comments |>

 Quoc Nguyen - Re: webwork installation and configuration  12/19/2006; 2:31:37 PM (reads: 163, responses: 0) Hi Dave, The links are working now. Thanks <| Post or View Comments |>