SID-00455: How to configure apache/twiki to point to twiki main page
| Status: |
Answered |
TWiki version: |
4.3.1 |
Perl version: |
5.10.0 Build 1005 |
| Category: |
CategoryInstallation |
Server OS: |
Windows 2003 |
Last update: |
16 years ago |
I am running twiki 4.3.1 on a Windows 2003 server and when I enter the IP address of the twiki server
http://172.16.253.130
into my browser I get "It works". If I fully qualify the path with
http://172.16.253.130/twiki/bin/view/Main/WebHome
I can get to my twiki home page. I've added a host file to my local workstation so that I now enter
http://portal/twiki/bin/view
and get my twiki main page.
How to I configure apache/twiki so that all I have to do is enter
http://portal
to be redirected to the twiki mainpage?
--
MichaelKerr - 2009-08-04
Discussion and Answer
You can have a .ht file with a rewrite rule or a redirect rule and then place this file in the main apache url path.
--
HugoDeLaCerda - 2009-08-04
Search and replace the default index.html file the Apache is serving by default with something like this
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Portal</title>
<META HTTP-EQUIV="REFRESH" CONTENT="0;URL=http://172.16.253.130/twiki/bin/view/Main/WebHome">
</head>
<body>
</body>
</html>
--
EnriqueCadalso - 2009-08-04
the pretty way is by doing 3 things.
- - Create a text file with the following line and save it as .htaccess in the main http directory (where index.html is)
RedirectMatch ^/$ /twiki/bin/view
- - Modify default site in apache sites-availible directory so it allows overrides:
NameVirtualHost *:80
<VirtualHost *:80>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow, deny
Allow from all
</Directory>
3.- If it's an old apache server make sure you have mod-rewrite active by uncommenting it's line in httpd.conf or apache2.conf
4.- Restart Apache webserver
This way all requests going to
http://portal
will be redirected to
http://portal/twiki/bin/view
.
--
HugoDeLaCerda - 2009-08-04
I tried going with Enrique's solution but couldn't locate the dir sites-available. I searched for a text entry called
VirtualHost and drew a blank. I went with Hugo's suggestion which worked but ended up modifying it slightly so that it read:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Portal</title>
<META HTTP-EQUIV="REFRESH" CONTENT="0;URL=http://portal/twiki/bin/view/Main/WebHome">
</head>
<body>
</body>
</html>
Many thanks to you both.
--
MichaelKerr - 2009-08-04
Sorry, I misread the postings. I ended up using Enriques solution
--
MichaelKerr - 2009-08-04
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.