Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic


  • Member
  • 2 posts
  • Joined 17-June 04
Hi guys,

Ive just built a Linux Webserver, and I have a problem...

website works if you type the actual address: http://www.*****.co.nz
however, if you type *****.co.nz without typing in the www, you will get a "Index of /" with a cgi-bin folder (which you cannot access). What i need, is for this to go to the website, whether or not you type in the www.

Ive have tried to use virtual hosts.... cant get it to work. Im probably doing it wrong..

In section 1 (global) i set:
Port 80
Servername ******
<virtualhost *> DocumentRoot /www/htdocs servername ****** </virtualhost>

and in section 3 or wherever it is in the virtual host part, i set:
<VirtualHost x.x.x.x:80>
ServerName www.*****.co.nz
DocumentRoot /www/htdocs

etc..... Ive tried heaps of other bits of code in other places from people various comments such as Listen x.x.x.x and bindaddress http://*******.co.nz

Is using virtual hosts even the right thing for what im trying to do? Im just going off what people have told me...

Any help would be muchly appreciated :)

How to remove advertisement from MSFN



    win2k Freak

  • Member
  • PipPipPipPip
  • 637 posts
  • Joined 23-November 04
nope, vertual host setting isn't the best way.
mode rewrite would be way better (But it would also disable the posebilities for setting subdomains..

have a look at hos mod_rewrite worsk on apache.org
[message of the .....whatever]
Dont be a luser*!*@msnf.org: Ask Good Questions. , read the microsoft guide, google-it-yourself
Do NOT use pirated software, there is free opensource software for allmost every task you seak!
Where is the "any key" ???




  • Member
  • PipPip
  • 299 posts
  • Joined 09-December 03
i'm not sure if you can even set this option in apache. i am pretty sure this is an issue with dns. where are you hosting this website?