Author |
|
hero789
Joined: 28 Dec 2009 Posts: 4 Location: England
|
Posted: Mon 28 Dec '09 21:19 Post subject: Apache virtualhost setup |
|
|
Hi
I am running xampp from a memory stick. I need to create a virtualhost running from localhost. I have previously set up apache virtualhosts on linux about two years ago. On xampp there is no etc/hosts file. The only virtualhost i can get to work is
code]
<VirtualHost *:80>
DocumentRoot "J:/xampp/htdocs/project/website"
ServerName localhost
</VirtualHost>
[/code]
which as you can see if very simple. If i try and deviate changing ServerName to localhosts with an s it wont work. I would like to create a virtualhost www.ituk.com. But this is not working. Any help would be appreciated, I have set up virtualhosts before on an earlier version of apache, but I have never set up apache virtualhosts on a memory stick. |
|
Back to top |
|
James Blond Moderator
![](images/avatars/3066243e8d00d4770e.gif)
Joined: 19 Jan 2006 Posts: 7325 Location: Germany, Next to Hamburg
|
|
Back to top |
|
hero789
Joined: 28 Dec 2009 Posts: 4 Location: England
|
Posted: Tue 29 Dec '09 0:58 Post subject: apache working |
|
|
Hi Thanks for your reply
I got apache to work.
I now have another question. I have the url working www.itconsul.com which is my test url. This is served by apache. I however want to have my homepage displayed under this url. In order to do so I have to enter the url www.itconsul.com/homepage.htm. Anyone know how to make www.itconsul.com direct to homepage.htm so that my homepage is displayed. |
|
Back to top |
|
Millennium
![](images/avatars/305474481830b2d768.gif)
Joined: 17 Apr 2006 Posts: 179 Location: Leiderdorp, NL, EU
|
Posted: Tue 29 Dec '09 1:08 Post subject: |
|
|
find the line what looks like (or just add) in httpd.conf:
Code: |
<IfModule dir_module>
DirectoryIndex index.html index.htm
</IfModule>
|
And change it to:
Code: |
<IfModule dir_module>
DirectoryIndex index.html index.htm homepage.htm
</IfModule>
|
but I suggest renaming "homepage.htm" to "index.htm" |
|
Back to top |
|
hero789
Joined: 28 Dec 2009 Posts: 4 Location: England
|
Posted: Tue 29 Dec '09 1:27 Post subject: solved |
|
|
Thanks that worked [/u] |
|
Back to top |
|