## Installation

### Config. Apache?

by Monte Saxby -
Number of replies: 8
I installed webwork from a live DVD - I believe it's 2.4 on Ubuntu 9.10. Things seem to work fine, but I must access by typing ip_address/webwork2. I need to be able to start webwork with JUST ip_address. Right now if I use the ip_address I get the default "It works! This is the default web page for this server ... (Oh yeah, webwork is the ONLY thing that this apache server is serving.)

This appears to be an apache configuration thing, but I can't figure out the exact details. Can anyone help me?

### Re: Config. Apache?

This is indeed something you can do with an apache configuration.

Here is how we did it on our server (the relevant files may be someplace else on your server):

1) mv /usr/local/apache2/htdocs/index.html to index.html.dist or some such thing.

2) create a new /usr/local/apache2/htdocs/index.html

which contains only the following single line:

(obviously above you replace webwork.uoregon.edu/webwork2 with whatever the URL for webwork is on your server)

-Hal

### Re: Config. Apache?

by Monte Saxby -
the following single line is missing is it:

webwork.uoregon.edu/webwork2 ?

### Re: Config. Apache?

Sorry, I don't know how I did that.

Our /usr/local/apache2/htdocs/index.html

contains the single line:

### Re: Config. Apache?

OK, now I've done this twice - I'm very sorry.  The auto-format interprets the line I'm trying to give you as code, and then doesn't send it.

The line is:

meta HTTP-EQUIV="REFRESH" content="0; url=http://webwork.uoregon.edu/webwork2"

except it needs to be enclosed in angle brackets.

### Re: Config. Apache?

by Monte Saxby -
Thanks - it works!

I actually figured out this out, but I did it based on your original reply (with a google search on URL redirect), so thanks to you it's almost working; still a little work left to get all the traffic going through the router smoothly.

### Re: Config. Apache?

by Sam Hathaway -

You can use RedirectMatch in your Apache config file to redirect / to /webwork2:

RedirectMatch ^/\$ /webwork2

This is slightly more efficient than the meta refresh method and doesn't require editing the distro-installed index.html file.

I'm not sure exactly how the WeBWorK LiveDVD is set up, but on Ubuntu you can generally create a new file in /etc/apache2/conf.d (called, say, redirect-root.conf) and but the RedirectMatch directive in there.