Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old October 15th, 2001, 06:28 AM
danp danp is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2001
Location: Sheffield, UK
Posts: 28 danp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Virtual hosts/ServerAlias problems

Hi there, I'm having a few problems setting up virtual hosts on our new apache server (not done this before). I have trawled through the red hat manuals and the apache documentation but can't see what I'm doing wrong.
Here is my setup:

Code:
NameVirtualHost 215.205.145.246

<VirtualHost 215.205.145.246>
ServerAdmin webmaster@actconsult.net
DocumentRoot /home/httpd/web
ServerName 213.205.145.246
ErrorLog /home/httpd/logs.error.log
CustomLog /home/httpd/logs/access.log common
</VirtualHost>

<VirtualHost 215.205.145.246>
ServerAdmin webmaster@actconsult.net
DocumentRoot /home/actconsult/web
ServerName www.actconsult.net
ServerAlias actconsult.net
ScriptAlias /cgi-bin/ /home/actconsult/cgi-bin/
ErrorLog /home/actconsult/logs.error.log
CustomLog /home/actconsult/logs/access.log common
</VirtualHost>

<VirtualHost 215.205.145.246>
ServerAdmin webmaster@actconsult.net
DocumentRoot /home/testdomain/web
ServerName testdomain.actconsult.net
ErrorLog /home/testdomain/logs/error.log
CustomLog /home/testdomain/logs/access.log common
</VirtualHost>


Ok, we have 1 IP address yet we will be hosting several more domains (none of them have come through yet but I have tried setting them up as testdomain.actconsult.net to no avail. The only page that is getting served is the www.actconsult.net.

Any help, advice, links would be grately appreciated.

Also, if anyone could offer advice on setting up https://ssl.actconsult.net it'd be great. We have all the certificates, I just need to set up the subdomain.

Reply With Quote
  #2  
Old October 15th, 2001, 03:09 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> NameVirtualHost 215.205.145.246

1) Change the IP to 213.205.145.246

2) You don't need the 1st <VirtualHost> block.

3) What is your default docroot (the one you specified globally)?
There seems to be misconfiguration all over the places, I need to see your default docroot.

>> ServerName testdomain.actconsult.net

4) You can't invent testdomain.actconsult.net. You need to add an A record in your actconsult.net zone record.

>> if anyone could offer advice on setting up https://ssl.actconsult.net it'd be great

Your current httpd.conf is highly misconfigured, so I suggest you to fix that first and before going any futher.

>> We have all the certificates, I just need to set up the subdomain

Keep in mind, ONE cert ONE FQDN ONE IP. Unless you want https://ssl.actconsult.net/subdomain/

Reply With Quote
  #3  
Old October 16th, 2001, 12:58 PM
danp danp is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2001
Location: Sheffield, UK
Posts: 28 danp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi thanks loads for your help. I'm next in work Friday so will give it a go then.

1) yup sorry, I was typing it accross - it is actually 213 n our actual file
2) ok thanks
3) the default docroot should be the same as actconsult.net, should I therefoe set it up outside a virtual host? or what?
4) ok thanks
5) yup, ok

Reply With Quote
  #4  
Old October 18th, 2001, 10:49 AM
Sheriff's Avatar
Sheriff Sheriff is offline
Oheim
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Austria
Posts: 69 Sheriff User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Here is what I did (after a standard Apache installation):

<VirtualHost domain1.at>

DocumentRoot /www/domain1
User wwwrun
ServerName www.domain1.at
ServerSignature On

</VirtualHost>

<VirtualHost domain2.at>

DocumentRoot /www/domain2
User wwwrun
ServerName www.domain2.at
ServerSignature On

</VirtualHost>

Hope that helps!
btw...I have a lil more within the VirtualHosts than postet here, but this should solve your problem.

best regards
Sheriff
__________________
There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence.

God is just hacker who rooted the world!

Reply With Quote
  #5  
Old October 18th, 2001, 11:35 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
His problem was DNS problem. Specifically, testdomain.actconsult.net not DNS lookup'able.

As far as your <VirtualHost> configuration:

>> User wwwrun

Unless suEXEC is enabled, don't put a User there. If it's the same default user, you still don't need to specifiy that.

>> ServerSignature On

You don't need this if you have it On globally.

Reply With Quote
  #6  
Old October 22nd, 2001, 05:44 AM
danp danp is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2001
Location: Sheffield, UK
Posts: 28 danp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi there, thanks for the help. I've got it nearly all working now.

I have a number fo virtual hosts working with different domains and I have set it up so that several subnets are redirected to our IIS server (using the file that is specified in the named.conf file) - these all work fine

However, I am still having problems setting up subnets of the type sql.actconsult.net that will actually reside on the linux box.

I've added a zone to the named.conf:
Code:
zone "sql.actconsult.net" {
  type master;
  file "master/sql.actconsult.net";
}
and then the file is set up as follows (found someone elses config on the net, not sure if it right though):
Code:
@ IN SOA dns1.actconsult.net hostmaster.actconsult.net (200110222 3600 900 1209600 43200)
@ IN NS dns1.actconsult.net


Can you spot what I haven't done or have done wrong? Also can you reccomend any good resources for this sort of thing.

Cheers

Reply With Quote
  #7  
Old October 22nd, 2001, 06:27 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> setting up subnets of the type sql.actconsult.net that will actually reside on the linux box

You need to set an A record for sql.actconsult.net to point to the IP of your linux box.

>> zone "sql.actconsult.net" {

No, you can't invent a new zone. The FQDN (i.e. sql.actconsult.net) should be specified in within the default actconsult.net zone. That said, you don't need to edit named.conf but /etc/named/master/actconsult.net file. You just need to add an A record.

Prior to posting something like this next time, please start a new thread, and only in appropriate forum, DNS forum specifically. For further reply relating to DNS on this thread, post to DNS forum.

Reply With Quote
  #8  
Old October 22nd, 2001, 06:43 AM
danp danp is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2001
Location: Sheffield, UK
Posts: 28 danp User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Ok, thanks I'll try that.

Sorry for the post being off topic, thought I'd just continue the topic as it is related.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > Virtual hosts/ServerAlias problems


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway