SunQuest
           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:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old May 28th, 2001, 12:25 PM
yoey2000 yoey2000 is offline
MMMM...Brains....
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 461 yoey2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 11 h 24 m 57 sec
Reputation Power: 8
Question Another Virtual Hosting Q, plz read 2

Since i was asked to restate my question, here we go :
i work on windows 98:

In the httpd.conf, it says :
# You may use the command line option '-S' to verify your virtual host
# configuration.

I have used that command line. Now, onto the hard parts.

#
# Use name-based virtual hosting.
#


#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

what would i put in this section if i want to host, lets say, domain.com.

Also, do i need to set anything else before i set the httpd.conf to virtual hosting?

Reply With Quote
  #2  
Old May 28th, 2001, 12:41 PM
Atrus's Avatar
Atrus Atrus is offline
yet another member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 262 Atrus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Hi!

First of all remove the comment signs '#' from col 1 (this is clear, right )
Then enter your server's IP in the opening vhost tag and in the NameVirtualHost directive.


NameVirtualHost 123.456.789.10

<VirtualHost 123.456.789.10:80>
ServerAdmin you@hotmail.com
DocumentRoot /www/docs/domaindir
ServerName domain.com
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>

The NameVirtualHost directive is the only thing necessary outside the <virtualhost> tags to enable vhosting.

Now you can add lots of vhost tags all with the same IP but different ports or different ServerNames.

Also you can have a ServerAlias directive within a vhost section for example if you want mydomain.com, my-domain.com and domain.com to serve the same files and write to the same logs.

...
<VirtualHost ...>
DocumentRoot ...
ServerName domain.com
ServerAlias mydomain.com my-domain.com
ErrorLog ...
CustomLog ...
</VirtualHost>



Greetings,

Atrus.

Last edited by Atrus : May 28th, 2001 at 12:47 PM.

Reply With Quote
  #3  
Old May 28th, 2001, 02:56 PM
yoey2000 yoey2000 is offline
MMMM...Brains....
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 461 yoey2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 11 h 24 m 57 sec
Reputation Power: 8
I did that exactly. but apache said
VirtualHost configuration:
24.164.0.35:80 is a NameVirtualHost
default server capitalcarnage.com (c:/program files/apach
e group/apache/conf/httpd.conf:970)
port 80 namevhost capitalcarnage.com (c:/program files/ap
ache group/apache/conf/httpd.conf:970)
Note the errors or messages above, and press the <ESC> key to exit. 25...

Reply With Quote
  #4  
Old May 28th, 2001, 05:46 PM
Atrus's Avatar
Atrus Atrus is offline
yet another member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 262 Atrus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Hi!

Would you post the relevant parts of your .conf for us to see?! Maybe I get it right then....

Atrus.

Reply With Quote
  #5  
Old May 28th, 2001, 05:54 PM
yoey2000 yoey2000 is offline
MMMM...Brains....
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 461 yoey2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 11 h 24 m 57 sec
Reputation Power: 8
Httpd.conf

here is the virtual hosting part
# End of proxy directives.

### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at <URL:http://www.apache.org/docs/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
#Use name-based virtual hosting.
NameVirtualHost My Ip ( I put this in to keep my IP Safe)

<VirtualHost My Ip:80>
ServerAdmin yoey2000@hotmail.com
DocumentRoot c:\phpweb
ServerName capitalcarnage.com
ErrorLog c:\logs\capitalcarnage.com-error_log
CustomLog c:\logs\capitalcarnage.com-access_log common
</VirtualHost>




#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

i think this is all that is needed to be shown

Reply With Quote
  #6  
Old May 28th, 2001, 05:57 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
Finally you posted something meaningful - capitalcarnage.com.

>> do i need to set anything else before i set the httpd.conf to virtual hosting?

Your domain is up and running. So what is the other domain that you wanted to configure as a vhost? You first need to contact ns1.hn.org, make sure that other domain is nslookup'able. Also set UseCanonicalName to Off. NameVirtualHost can be a * or the IP 24.164.0.35.

root /root # nslookup
Default Server: ns1.mydomain.com
Address: 12.34.56.78

> set type=soa
> capitalcarnage.com
Server: ns1.mydomain.com
Address: 12.34.56.78

Non-authoritative answer:
capitalcarnage.com
origin = ns1.hn.org
mail addr = hostmaster.capitalcarnage.com
serial = 991089657
refresh = 16384 (4h33m4s)
retry = 2048 (34m8s)
expire = 1048576 (1w5d3h16m16s)
minimum ttl = 2560 (42m40s)

Authoritative answers can be found from:
capitalcarnage.com nameserver = ns1.hn.org
capitalcarnage.com nameserver = AUX1.hn.org
ns1.hn.org internet address = 64.71.163.40
AUX1.hn.org internet address = 64.71.163.43
> exit

Reply With Quote
  #7  
Old May 28th, 2001, 06:36 PM
yoey2000 yoey2000 is offline
MMMM...Brains....
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 461 yoey2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 11 h 24 m 57 sec
Reputation Power: 8
wait a sec

ok, i set the other thing to off, but what do i do with :
root /root # nslookup
Default Server: ns1.mydomain.com
Address: 12.34.56.78

> set type=soa
> capitalcarnage.com
Server: ns1.mydomain.com
Address: 12.34.56.78

Non-authoritative answer:
capitalcarnage.com
origin = ns1.hn.org
mail addr = hostmaster.capitalcarnage.com
serial = 991089657
refresh = 16384 (4h33m4s)
retry = 2048 (34m8s)
expire = 1048576 (1w5d3h16m16s)
minimum ttl = 2560 (42m40s)

Authoritative answers can be found from:
capitalcarnage.com nameserver = ns1.hn.org
capitalcarnage.com nameserver = AUX1.hn.org
ns1.hn.org internet address = 64.71.163.40
AUX1.hn.org internet address = 64.71.163.43
> exit

forgive me, for i am just starting out.

Reply With Quote
  #8  
Old May 28th, 2001, 07:57 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
That was what I was doing to get the dns info for your domain. You can ignore that since you are on windows. So what is the name of your other domain? You still haven't replied that. Keep in mind, getting dns configured appropriately is the very first step to start.

Reply With Quote
  #9  
Old May 28th, 2001, 08:23 PM
yoey2000 yoey2000 is offline
MMMM...Brains....
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 461 yoey2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 11 h 24 m 57 sec
Reputation Power: 8
my domain is

my domain is still capitalcarnage.com. the reason it is up and running is because when i am not working on the virtual hosting, i leave that up. Now, what is next. also, do you have ICQ or AIM?

Reply With Quote
  #10  
Old May 29th, 2001, 05:51 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
>> my domain is still capitalcarnage.com

So do you have any domain other than capitalcarnage.com? You don't need to configure vhost if you only have one domain.

>> do you have ICQ or AIM?

Yup, I got ICQ. Nope, I can't release my UIN in public. Sorry.

Reply With Quote
  #11  
Old May 29th, 2001, 08:17 AM
yoey2000 yoey2000 is offline
MMMM...Brains....
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 461 yoey2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 11 h 24 m 57 sec
Reputation Power: 8
Hosting

Hey, email me your ICQ then, its kinds hard doing this on the forum. yoey2000@hotmail.com

Reply With Quote
  #12  
Old May 29th, 2001, 10:17 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
>> email me your ICQ then

Why should I?

>> its kinds hard doing this on the forum

Not at all if you reply to the same question that I have asked THREE times.

Reply With Quote
  #13  
Old May 30th, 2001, 10:03 AM
yoey2000 yoey2000 is offline
MMMM...Brains....
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 461 yoey2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 11 h 24 m 57 sec
Reputation Power: 8
Exclamation virtual name hosting

i wish to vhost forum.capitalcarnage.com, ok?

Reply With Quote
  #14  
Old May 30th, 2001, 10:38 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
Code:
UseCanonicalName Off

NameVirtualHost *

<VirtualHost *>
   DocumentRoot "/www/htdocs"
  ServerAdmin webmaster@capitalcarnage.com
   ServerName www.capitalcarnage.com
  ServerAlias capitalcarnage.com
</VirtualHost>

<VirtualHost *>
   DocumentRoot "/www/vhosts/forum.capitalcarnage.com/htdocs"
   ServerName forum.capitalcarnage.com
   ServerAdmin forum@capitalcarnage.com
   ScriptAlias /cgi-bin/ "/www/vhosts/forum.capitalcarnage.com/cgi-bin/"
   CustomLog /www/vhosts/forum.capitalcarnage.com/log/http_log combined
</VirtualHost>


forum.capitalcarnage.com is resolvable so the DNS portion is done. You need to figure out the syntax for Apache on Windows yourself.

Reply With Quote
  #15  
Old May 30th, 2001, 02:03 PM
yoey2000 yoey2000 is offline
MMMM...Brains....
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 461 yoey2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 11 h 24 m 57 sec
Reputation Power: 8
Exclamation did it

did exactly and got this from Apache:

VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80 is a NameVirtualHost
default server www.capitalcarnage.com (c:/program files/a
pache group/apache/conf/httpd.conf:970)
port 80 namevhost www.capitalcarnage.com (c:/program file
s/apache group/apache/conf/httpd.conf:970)
port 80 namevhost forum.capitalcarnage.com (c:/program fi
les/apache group/apache/conf/httpd.conf:977)
Note the errors or messages above, and press the <ESC> key to exit. 25...

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > Another Virtual Hosting Q, plz read 2


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