Wikiposts
Search
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

Thread Tools
 
Search this Thread
 
Old 9th Mar 2005, 08:54
  #1 (permalink)  
Thread Starter
 
Join Date: Mar 2004
Location: Bournemouth, UK
Age: 54
Posts: 133
Likes: 0
Received 0 Likes on 0 Posts
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 Mar 2005, 09:31
  #2 (permalink)  

'nough said
 
Join Date: Sep 2002
Location: Raynes Park
Age: 58
Posts: 1,025
Likes: 0
Received 0 Likes on 0 Posts
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 Mar 2005, 10:07
  #3 (permalink)  
 
Join Date: Sep 2002
Location: London, UK
Posts: 778
Likes: 0
Received 0 Likes on 0 Posts
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 Mar 2005, 14:13
  #4 (permalink)  
Thread Starter
 
Join Date: Mar 2004
Location: Bournemouth, UK
Age: 54
Posts: 133
Likes: 0
Received 0 Likes on 0 Posts
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 Mar 2005, 19:18
  #5 (permalink)  
Thread Starter
 
Join Date: Mar 2004
Location: Bournemouth, UK
Age: 54
Posts: 133
Likes: 0
Received 0 Likes on 0 Posts
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



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

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