|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
>> 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/ |
|
#3
|
|||
|
|||
|
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 |
|
#4
|
||||
|
||||
|
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! |
|
#5
|
|||
|
|||
|
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. |
|
#6
|
|||
|
|||
|
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";
}
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 |
|
#7
|
|||
|
|||
|
>> 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. |
|
#8
|
|||
|
|||
|
Ok, thanks I'll try that.
Sorry for the post being off topic, thought I'd just continue the topic as it is related. |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > Virtual hosts/ServerAlias problems |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|