Notices
Computer/Internet Issues & Troubleshooting Anyone with questions about the terribly complex world of computers or the internet should try here. NOT FOR REPORTING ISSUES WITH PPRuNe FORUMS! Please use the subforum "PPRuNe Problems or Queries."

Apache web server setup

Old 9th March 2005 | 08:54
  #1 (permalink)  
Thread Starter
 
Joined: Mar 2004
Posts: 133
Likes: 0
From: Bournemouth, UK
Question Apache web server setup

I've got a question for anybody that is familiar with running Apache on Linux. I want to setup multiple web servers to run on a single machine. I only have a single IP address and a single network connection on the box. I currently have a web site up and running, but when I tried to add a second, using VirtualHost, I got into a bit of a knot. If using virtual hosts is the way to go then I'm sure I'll work it out, but if anybody has any advice I would appreciate it.

Regards
Stoney
Stoney X is offline  
Old 9th March 2005 | 09:31
  #2 (permalink)  

'nough said
 
Joined: Sep 2002
Posts: 1,025
Likes: 0
From: Raynes Park
Are you editing httpd.conf directly?

My setup uses cPanel which modifies the file directly but once it a while I find it easier to edit it myself.

Hence to add a new virtual host you would copy and paste and existing entry and edit the url/local path etc.

Info on Apache site
here

hth
Charles
amanoffewwords is offline  
Old 9th March 2005 | 10:07
  #3 (permalink)  
 
Joined: Sep 2002
Posts: 778
Likes: 0
From: London, UK
Using Virtual Hosts will definitely do want you want. You want 'Name-based' Virtual Hosts, because you've only a single IP address. It's very straightforward. All you do is:

NameVirtualHost *

<VirtualHost *>
ServerName www.domain.tld
DocumentRoot /www/domain
</VirtualHost>

<VirtualHost *>
ServerName www.otherdomain.tld
DocumentRoot /www/otherdomain
</VirtualHost>


This example is from the documentation on the subject which is here.
drauk is offline  
Old 9th March 2005 | 14:13
  #4 (permalink)  
Thread Starter
 
Joined: Mar 2004
Posts: 133
Likes: 0
From: Bournemouth, UK
Thanks amanoffewwords and drauk. Nice to know I'm on the right track. What you say is pretty much what I had gleamed off the net last night. I suspect finger trouble was causing the probs. I'll give it another go tonight.

Regards
Stoney
Stoney X is offline  
Old 9th March 2005 | 19:18
  #5 (permalink)  
Thread Starter
 
Joined: Mar 2004
Posts: 133
Likes: 0
From: Bournemouth, UK
My system is now sorted. Two web sites running on one box. Thanks again for your help.

Regards
Stoney
Stoney X is offline  

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Thread Tools
Search this Thread

Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service

Copyright © 2026 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.