Forum Moderators: phranque
Thankyou very much for your time.
Alias /menu/ /path/to/control/panel/
There is usually an Alias already set up for /icons/. If you use that as an example you should be ok.
All domain names point to "http://220.240.21.36/[domain]". So if a users domain name is "spun.com" they would point it at "http://220.240.21.36/spun".
I want to set an Alias as such "Alias /.*/menu "C:/web" (where ".*" means any amount of any charactors).
The effect I am trying to achieve is that no matter what the domain name, if it is followed by "/menu" as such "http://www.boat.com/menu" they will be sent to "C:/web".
The problem is that ".*" does not work. I can put "Alias /FTO/menu" "C:/web" but to do this for every domain is very laboursome.
Does anyone know a way to make this work?
I'd be surprised if it worked differently on Windows...
In other words unless anyone knows how to get around it, I can only have one host.
I tried getting [220.***.21.36...] to point to C:/web/example/example2/example3/example4/example5 using the following methods.
NameVirtualHost localhost:80
<VirtualHost localhost:80>
ServerAdmin whatever
DocumentRoot C:/web
ServerName localhost:80
</VirtualHost>
NameVirtualHost localhost:80 and localhost/example:80
<VirtualHost localhost:80 and localhost/example:80>
ServerAdmin whatever
DocumentRoot C:/web/example/example2/example3/example4/example5
ServerName localhost:80 and localhost/example:80
ServerAlias localhost and localhost/example
</VirtualHost>
but no success unfortunately since all domain names point to [220.***.21.36...] and windows calls them all localhost requests. This coupled with the fact that our ISP only gives us one IP makes it pretty hard to use virtual hosts.
So the problem remains, how to assign a global alias.
[edited by: jdMorgan at 6:29 am (utc) on Mar. 29, 2005]
[edit reason] Obscured IP addresss. [/edit]
Jim
My setup is this:
WinXP PRO PC with a direct connection to the internet.
Our internet IP is 220.***.21.36.
Has Apache, MySQL, ASP, PHP, phpMyAdmin, MyODBC and GuildFTPd.
Web Root is C:/web.
My question is this, my fiancee has setup a dot.tk domain name. Its URL is [example.tk...] and she has pointed it to [220.***.21.36...] How does the server differenciate between that and my other domain name [.another.example.com.au...] which points to [220.***.21.36...] Does it derive the host from the address bar of the clients browser (ie: [whatever.com)...] or the absolute address that the domain name was refered to (ie: 220.***.21.36)?
If you or anyone else can answer that question, I would then ask what should my virtual hosts be and what hosts should I set in the hosts file?
And what does Kalos mean by "Unless 127.0.0.5 is bound to your NIC then it won't matter what you set in your HOSTS file for that IP address as it will try to find an address off your local machine, and network."? That post is in "http://www.webmasterworld.com/forum92/2695-2-10.htm"
[edited by: jdMorgan at 8:36 pm (utc) on Mar. 29, 2005]
[edit reason] No URLs or complete IPs. Please see TOS. [/edit]
For an HTTP/1.0 transaction, the Hostname header is not sent. Therefore, name-based virtual servers don't work with HTTP/1.0 clients.
127.0.0.1 is a "fake" IP address. It means, "connect to whatever machine this request originates from". So a server of your computer will respond to your requests for 127.0.0.1, while your friend Joe in the next office has a computer that thinks its address is 127.0.0.1 also, if his machine is set up with a server, too. 127.0.0.1 is a non-routable address for the local host, i.e. every computer in the world using TCP/IP thinks its address is 127.0.0.1, although it can have other addresses as well.
* Here's what a simple HTTP/1.1 request header looks like. You can connect to your server by IP address and type this in using Telnet or HyperTerminal if you like:
GET /index.html HTTP/1.1<nl>
Host: www.example.com<nl>
User-agent: Mozilla/5.0 WebmasterWorld-browser<nl><nl>
Jim
On a larger note, I still have not been able to get external requests mapped to the correct domain. I think it would be best if we get back to the basics and start a little trouble shooting. I will leave my servers configuration as is and only make the changes you specify for trouble shooting purposes. Hopefully we can sort out what the problem is. That is if your up for it.
At present I have eraced all virtual hosts so we have a clean slate. The hosts file is as standard 127.0.0.1 localhost. I believe you have our IP by now.
Conf File.
Listen 80.
ServerName localhost:80.
DocumentRoot "C:/web".
Directory "C:/web".
UserDir "My Documents/My Website". <- What should that be?
DirectoryIndex html, html.var, php, htm, asp, home.asp.
No Virtual hosts setup.
Directory structure.
C:/web/index.asp <- server control panel (under construction).
C:/web/FTO/index.html (where [fortheorphans.tk...] points).
C:/web/flatstik_couriers/index.asp.
C:/web/ISSSG/index.html.
Everything else is pretty much as standard except for what the php installation instructions and MySQL ones told me to do.
I dont know if .tk domain names are http 1.0 or 1.1 and have no idea how to find out but [fortheorphans.tk...] is what we have been using to test it all remotely. Any ideas?