View previous topic :: View next topic |
Author |
Message |
Guest
|
Posted: Tue May 28, 2002 9:58 pm Post subject: multiple web sites |
|
|
is it possible to configure your server to host multiple web sites with different domain names. i know that i can use no-ip for the domains i was just wondering if i could host more than one site? |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Tue May 28, 2002 10:17 pm Post subject: Re: multiple web sites |
|
|
Anonymous wrote: | is it possible to configure your server to host multiple web sites with different domain names. i know that i can use no-ip for the domains i was just wondering if i could host more than one site? |
Abyss Web Server 1.0 is a personal web server made to host only one web server. So there is no way to host multiple web servers in the current version. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
Guest
|
Posted: Tue May 28, 2002 11:25 pm Post subject: Yes, you can |
|
|
Well, although it ain't possible to run abyss twice, there is a way to host multiples sites. Just make another folder in your htdocs folder. Place your second site in here. Next thing you have to do is getting a reasonable domain name. I recommend visiting http://www.dot.tk for a free .tk domain name. Redirect that url (www.mysite.tk or www.mysite.msgserver.com) for example) to your solid ip adres (http://68.89.123.643 for example), and put a / with the name of your sitefolder behind it, so you get http://68.89.123.643/yoursite/. If you make and indexfile in that folder, everything will be fine.
Greetz, Grandbragus.
(Visit http://www.rayman3.tk) |
|
Back to top |
|
|
henk Guest
|
|
Back to top |
|
|
michaelw -
Joined: 20 Oct 2002 Posts: 7
|
Posted: Mon Oct 21, 2002 5:58 pm Post subject: |
|
|
Not quite - those are subdomains. Define vhosting as multiple domains resolved to the same IP address and port. Eg, foo.com and baz.com both resolve to 123.123.123.123. The problem is how to tell them apart and return the correct page, since the server doesn't immediately know which domain name was used to invoke it.
The answer is to get the server out of the HTTP header. Apache does this for you. Abyss doesn't, but the header is available in the environment and could be parsed by eg PHP, assuming Abyss sets $http_host - I've not looked. You'd probably then map them to different vdirs in PHP, for example by prepending the vdir and sending back a redirect.
This isn't real vhosting because the hosts aren't separately managed on the server, but it would behave like it to the user. |
|
Back to top |
|
|
michaelw -
Joined: 20 Oct 2002 Posts: 7
|
Posted: Mon Oct 21, 2002 6:32 pm Post subject: |
|
|
Not quite - those are subdomains. Define vhosting as multiple domains resolved to the same IP address and port. Eg, foo.com and baz.com both resolve to 123.123.123.123. The problem is how to tell them apart and return the correct page, since the server doesn't immediately know which domain name was used to invoke it.
The answer is to get the server out of the HTTP header. Apache does this for you. Abyss doesn't, but the header is available in the environment and could be parsed by eg PHP using $http_host. You'd probably then map them to different vdirs in PHP, for example by prepending the vdir and sending back a redirect.
This isn't real vhosting because the hosts aren't separately managed on the server, but it would behave like it to the user.
(later)
I found some code to do this sort of thing here : http://www.phpbuilder.com/tips/item.php?id=352 |
|
Back to top |
|
|
DLashley -
Joined: 18 Dec 2002 Posts: 207 Location: New York, NY
|
Posted: Tue Feb 11, 2003 10:06 pm Post subject: Re: Yes, you can |
|
|
Is there a URL redirection service that will "cloak" your actual IP#, so it always shows the "http://www.mysite.tk" address as the first part of the URL???
Anonymous wrote: | Well, although it ain't possible to run abyss twice, there is a way to host multiples sites. Just make another folder in your htdocs folder. Place your second site in here. Next thing you have to do is getting a reasonable domain name. I recommend visiting http://www.dot.tk for a free .tk domain name. Redirect that url (www.mysite.tk or www.mysite.msgserver.com) for example) to your solid ip adres (http://68.89.123.643 for example), and put a / with the name of your sitefolder behind it, so you get http://68.89.123.643/yoursite/. If you make and indexfile in that folder, everything will be fine.
Greetz, Grandbragus.
(Visit http://www.rayman3.tk) |
_________________ DLashley |
|
Back to top |
|
|
awen -
Joined: 07 Mar 2003 Posts: 12 Location: Earth
|
Posted: Fri Mar 07, 2003 4:44 pm Post subject: Multiple Domains |
|
|
There are several things you can do, as work-arounds. One is to set up your primary entry page, call it default.asp and use the following code or custom variation of it:
<% @Language = "VBScript" %>
<% Option Explicit
Response.Buffer = True
Dim HostURL
Dim NewLocation
HostURL = Lcase(Request.ServerVariables("HTTP_HOST"))
Select Case HostURL ' Find which site to redirect to
Case "www.domain1.com", "domain1.com"
NewLocation = "home.asp"
Case "www.domain2.com", "domain2.com"
NewLocation = "domain2/default.asp"
Case "www.domain3.org", "domain3.org"
NewLocation = "domain3/default.asp"
Case Else ' Default to main page
NewLocation = "home.asp"
End Select
Response.Redirect NewLocation
Response.Flush
Response.End
%>
Also, to mask your primary domain name with your secondary domain name, you can use a script that utilizes Frames. An example can be downloaded and used from this location:
http://www.stargate.com/pages/faq.asp?section=URL%20Forwarding&question=125
When I tried using the Frames technique, I ran into a number of linking and cookie storing/retrieving problems, which I didn't want to spend the time exploring, so I removed the masking and settled for the URL forwarding.
NOTE: It is assumed that all domains are pointing to your single IP Address. _________________ Awen - /|\ |
|
Back to top |
|
|
Bluedog -
Joined: 05 Jan 2003 Posts: 179
|
Posted: Fri Mar 07, 2003 5:40 pm Post subject: |
|
|
there is a php example by me, in the tutorials forum. |
|
Back to top |
|
|
DLashley -
Joined: 18 Dec 2002 Posts: 207 Location: New York, NY
|
Posted: Sun Mar 09, 2003 12:46 am Post subject: |
|
|
Thank you both. :-) _________________ DLashley |
|
Back to top |
|
|
skylark -
Joined: 08 Feb 2003 Posts: 10 Location: Missouri
|
Posted: Sun May 04, 2003 6:59 am Post subject: Multiple Websites |
|
|
Well, I tried every script to get my sites to redirect. None of them worked. I greatly appreciate those that offered scripts, and Im sure they do work. They just wouldnt work for me for some reason. Until I found the asp script. I simply installed ahtml and made my default.asp page and voila, it woorrkkksss....yaaaayyyy. I have to thank awen for this script. You're a life saver.
check me out!
http://the-espot.org *(in progress)
http://loomisperformancehorses.com
http://toui.net *(in progress) |
|
Back to top |
|
|
vbgunz -
Joined: 02 Feb 2003 Posts: 615 Location: Florida
|
Posted: Sun May 04, 2003 7:08 am Post subject: |
|
|
Skylark, are all of your sites being hosted on one machine using Abyss? Pretty cool... Does the ASP script also keep the URL in the address field? Really cool if yeah. Thanks for letting me know :) _________________ Victor B. Gonzalez
http://aeonserv.com |
|
Back to top |
|
|
s1asher -
Joined: 20 Mar 2003 Posts: 53
|
Posted: Wed May 07, 2003 4:03 pm Post subject: |
|
|
Is it possible to use the ASP script to redirect to another port?
i.e. webmail.mysite.no-ip.com would redirect to mysite.no-ip.com:81 |
|
Back to top |
|
|
Nildey -
Joined: 21 Mar 2003 Posts: 5
|
Posted: Sat May 24, 2003 6:14 pm Post subject: Problem with default.asp |
|
|
Could somebody tell me what I am doing wrong here, please? I did install AHTML. This is the entire content of my default.asp page:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Longhorn PCs Webhosting</title>
</head>
<body bgcolor="midnightblue">
<% @Language = "VBScript" %>
<% Option Explicit
Response.Buffer = True
Dim HostURL
Dim NewLocation
HostURL = Lcase(Request.ServerVariables("HTTP_HOST"))
Select Case HostURL ' Find which site to redirect to
Case "www.longhornpcs.com", "longhornpcs.com"
NewLocation = "htdocs/index.htm"
Case Else ' Default to main page
NewLocation = "index.html"
End Select
Response.Redirect NewLocation
Response.Flush
Response.End
%>
</body>
</html> |
|
Back to top |
|
|
os17fan -
Joined: 21 Mar 2003 Posts: 531 Location: USA
|
Posted: Sat May 24, 2003 10:00 pm Post subject: |
|
|
I checked that asp code and it said:
Code: | Microsoft VBScript compilation error- Error '800a0400'
Expected statement
C:\Program Files\ActiveHTML\AHTML\chat\default.asp, line 1
Option Explicit
^
|
I don't know what the error is because i got that many times , i think you need Vbscript installed , help me also :oops: _________________ This web server is the best ! |
|
Back to top |
|
|
|