Apache2Triad Help, Support and Development Forum Index Search Profile Log in to check your private messages Log in Register Memberlist Attachments Statistics Crew/Ranks Archive
 Help with IPs and Domains
Google
Post new topic Reply to topic
Author Message
Ads
 
 


Joined: 13 Mar 2006
Posts: 9
Location: California, United States

PostPosted: Mon Apr 03, 2006 10:15 pm Reply with quoteBack to top

Hi everyone...I'm sorry to bug anyone but I just needed some help. I have just bought 2 domain names and I would like to use A2T to host them. Right now I'm on a LAN connected on a Linksys router...I only have 3 pcs on this network. Anyways, what I want to is use those domains so that I may be able to access the websites hosted on my server. I have tried redirecting it but It does not work. Also.. http://www.whatismyip.com/ says my IP address is 71.133.247.131 but my server IP is 192.168.1.100. So what IP should i use? Or what can I do that I may be able to use my domain names for my servers? Any help would be welcome. Thank you!
________
Ts100


Last edited by Ads on Sat Feb 12, 2011 11:52 pm; edited 1 time in total
View user's profileSend private message
dawg
support
support


Joined: 11 Apr 2004
Posts: 180

PostPosted: Tue Apr 04, 2006 1:50 pm Reply with quoteBack to top

Ads wrote:
Hi everyone...I'm sorry to bug anyone but I just needed some help. I have just bought 2 domain names and I would like to use A2T to host them. Right now I'm on a LAN connected on a Linksys router...I only have 3 pcs on this network. Anyways, what I want to is use those domains so that I may be able to access the websites hosted on my server. I have tried redirecting it but It does not work. Also.. http://www.whatismyip.com/ says my IP address is 71.133.247.131 but my server IP is 192.168.1.100. So what IP should i use? Or what can I do that I may be able to use my domain names for my servers? Any help would be welcome. Thank you!



Point the New Domian names to : 71.133.247.131

Log into your router and port forward 21, 25, 80, and 110 to: 192.168.1.100

Open up the httpd.conf and set up your virtual hosts with the new domain names.
View user's profileSend private message
Ads
 
 


Joined: 13 Mar 2006
Posts: 9
Location: California, United States

PostPosted: Wed Apr 05, 2006 10:02 am Reply with quoteBack to top

Dawg, thanks! Very Happy That worked great. Right now I only have one problem though. I have 2 domains and when I type in my first domain www.site1.com it works great but when I try and go to my www.site2.com domain...it takes me to my www.site1.com. Here is how I have set up my Virtual Hosts.

# Use name-based virtual hosting.
#
#NameVirtualHost *

#
# 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.

Listen 192.168.1.100:80
Listen 192.168.1.100:81

<VirtualHost 192.168.1.100:80>
ServerAdmin user@domain1.com
DocumentRoot C:/apache2triad/htdocs/domain1.com
ServerName www.domain1.com
ServerAlias domain1.com
DirectoryIndex index.html index.html.var index.php index.php4 index.shtml index.cgi
ErrorLog c:/apache2triad/logs/www.domain1.com-error.log
CustomLog c:/apache2triad/logs/www.domain1.com-access.log combined
</VirtualHost>


<VirtualHost 192.168.1.100:81>
ServerAdmin user@domain2.com
DocumentRoot C:/apache2triad/htdocs/domain2.com
ServerName www.domain2.com
ServerAlias domain2.com
DirectoryIndex index.html index.html.var index.php index.php4 index.shtml index.cgi
ErrorLog c:/apache2triad/logs/www.domain2.com-error.log
CustomLog c:/apache2triad/logs/www.domain2.com-access.log combined
</VirtualHost>

Any help or suggestions would be great. Thank you guys soo much! Very Happy
________
Vaporizer answer


Last edited by Ads on Sat Feb 12, 2011 11:52 pm; edited 1 time in total
View user's profileSend private message
dawg
support
support


Joined: 11 Apr 2004
Posts: 180

PostPosted: Wed Apr 05, 2006 11:46 am Reply with quoteBack to top

Try Listening on a single port -
there should be no need to mix the ports.

As long as apache has the correct directives, loading multiple domains on a singe port will be fine:

Code:


#
# Use name-based virtual hosting.
#
NameVirtualHost *

#
# 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>

<VirtualHost *>
    ServerAdmin admin@domain1.com
    DocumentRoot D:\apache2triad\htdocs
    ServerName domain1.com
</VirtualHost>

<VirtualHost *>
   ServerAdmin admin@domain2.com
    DocumentRoot D:\apache2triad\htdocs\hosted\domain2
    ServerName domain2.com
</VirtualHost>

<VirtualHost *>
    ServerAdmin admin@domain3.com
    DocumentRoot D:\apache2triad\htdocs\hosted\domain3
    ServerName domain3.com
</VirtualHost>


View user's profileSend private message
Ads
 
 


Joined: 13 Mar 2006
Posts: 9
Location: California, United States

PostPosted: Wed Apr 05, 2006 9:59 pm Reply with quoteBack to top

Alright, I tried changing it to the coding that you gave me and my domain2.com is still going to domain1.com. I don't understand. The only way that domain2.com goes to its actual site is if I type in www.domain2.com:81. Any ideas what it could be? Shocked
________
SUBARU R-2


Last edited by Ads on Sat Feb 12, 2011 11:52 pm; edited 1 time in total
View user's profileSend private message
Joshua Meadows (DemoRic)
support
support


Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas

PostPosted: Thu Apr 06, 2006 1:13 am Reply with quoteBack to top

Quote:
there should be no need to mix the ports

What I recommend is just having both Virtual Hosts on the same port

Code:
<VirtualHost 192.168.1.100:80>
ServerAdmin user@domain2.com
DocumentRoot C:/apache2triad/htdocs/domain2.com
ServerName www.domain2.com
ServerAlias domain2.com
DirectoryIndex index.html index.html.var index.php index.php4 index.shtml index.cgi
ErrorLog c:/apache2triad/logs/www.domain2.com-error.log
CustomLog c:/apache2triad/logs/www.domain2.com-access.log combined
</VirtualHost>


or you CAN use multiple ports
NameVirtualHost *:80
NameVirtualHost *:81
(also you can replace the *wildcard with 192.168.1.100)

However there are many ways to use virtual hosts in apache, for other examples see http://httpd.apache.org/docs/2.0/vhosts/
View user's profileSend private messageYahoo MessengerICQ Number
dawg
support
support


Joined: 11 Apr 2004
Posts: 180

PostPosted: Thu Apr 06, 2006 10:56 am Reply with quoteBack to top

Why are you using 2 different Ports?

You dont need them -

The default Port for http is 80. Unless you specify another port
(by typing http://domain.com:port ) then any request will load the default site, in this case domain1.

Ie try loading your public IP in a browser. Domain1 will load.


If you type http://your.wan.address.here:81 Domain2 will load.

The reason is is called Namebased Virtual hosting, is to allow multiple domains on one ip and protocol.

A domain name is a simple name for a numerical address.

domain1.com. IN A 12.12.12.12
domain2.com. IN A 12.12.12.12

As you can see, both point to the same IP (which is the address of the webserver)

Once the request arrives at the server, the Software takes over and translates the Domain request into a Directory --

So domain1 = /root/htdocs/somedir/domain1
and
So domain2 = /root/htdocs/somedir/domain2

You dont need additional ports to use VirtualHosts.

This is a really simplified description, but is essentially correct.

Remove the Ports and use


Code:
<VirtualHost *>
ServerAdmin user@domain2.com
DocumentRoot C:/apache2triad/htdocs/domain2.com
ServerName www.domain2.com
ServerAlias domain2.com
DirectoryIndex index.html index.html.var index.php index.php4 index.shtml index.cgi
ErrorLog c:/apache2triad/logs/www.domain2.com-error.log
CustomLog c:/apache2triad/logs/www.domain2.com-access.log combined
</VirtualHost>


Restart -- it'll work fine.
View user's profileSend private message
Ads
 
 


Joined: 13 Mar 2006
Posts: 9
Location: California, United States

PostPosted: Mon Apr 17, 2006 4:23 am Reply with quoteBack to top

I have it set up that way and I have tried every other way to set it up and nothing. It has not worked at all. I'm using Win 2003 Server by the way. I did not like the way Win 2003 uses web hosting so I'm just using A2T. Anyways, yeah. I'm thinking of converting to RedHat Linux. Does A2T work on Linux?
________
E cigarette


Last edited by Ads on Sat Feb 12, 2011 11:53 pm; edited 1 time in total
View user's profileSend private message
Joshua Meadows (DemoRic)
support
support


Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas

PostPosted: Thu Apr 20, 2006 10:30 pm Reply with quoteBack to top

There is no Apache2Triad distro for linux/unix
View user's profileSend private messageYahoo MessengerICQ Number
Display posts from previous:      
Post new topic Reply to topic


 Jump to:   



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme
All times are GMT