Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have been able to access my laptop based web server from the 'other' side of my default gateway router using dyndns address like this ...
harry.dyndns-work.com
My web apps on the laptop have been set up using apache virtual domains and there are about 10 of them. The landing page of http://harry.dyndns-work.com seems to take me to first of these domains in alphabetical order..
domain dev.alonso.org
I would like to know how I can access each of these different domains using harry.dyndns-work.com ?
As I can understand you have a web server that is hosting the site harry.dyndns-work.com. But when you access the site it displays you a list of virtual domains that you have configured so when you access the site http://harry.dyndns-work.com it shows something like this:
1. abcdomain
2. defdomain
3. ghidomain
and so on...
I would have suggested for the re-direction but that will create a problem as we have got multiple choices and we are not re-directing to a single destination rather we want it for different destination.
What you can try is creating either A record (alias will not work because we have got different destinations) for separate domains in dns server and that will look as follows:
abcdomain.harry.dyndns-work.com
It would be useful if you have elaborated a little more in how you have setup the virtual hosts and how the main page appears when you connect to http://harry.dyndns-work.com
Last edited by T3RM1NVT0R; 06-11-2011 at 09:40 AM.
RE As I can understand you have a web server that is hosting the site harry.dyndns-work.com. But when you access the site it displays you a list of virtual domains that you have configured so when you access the site http://harry.dyndns-work.com it shows something like this:
No that is NOT the case. I set up a free DNS name with http://www.dyndns.com/ that is called 'harry.dyndns-work.com'
When I enter http://harry.dyndns-work.com/ into my browser all port 80 traffic from to my DG (public side) is routed to my humble laptop. I guess my laptop interprets the request as 'http://localhost'. Problem is localhost is not set to point anywhere since I have 10 apache virtual domains set up each with their own config file and unique servername.
The landing page of http://harry.dyndns-work.com seems to take me to first of these domains - dev.alonso.org and displays the contents of it.
None of my domains are called 'harry.dyndns-work.com'
I hope this clarifies things,
Steven M
Last edited by ksmatthews; 06-11-2011 at 10:14 AM.
You could use redirection. You can only point the dynDNS domain to one ip address, and that is your isp defined public ip. The first apache virtual domain is the default site that gets used if no other domain is specified in the http request.
You could put some redirection rules in an .htaccess file in the document root of the first virtual domain, such that browsing to http://harry.dyndns-work.com/alonso will redirect to that virtual site, and http://harry.dyndns-work.com/domain2 will redirect queries to that virtual site.
Because you must use the harry.dyndns-work.com domain from the outside, each virtual site should use relative links within itself, so that there are no browser redirects to non-externally visible domains.
RE You could put some redirection rules in an .htaccess file in the document root of the first virtual domain, such that browsing to http://harry.dyndns-work.com/alonso will redirect to that virtual site, and http://harry.dyndns-work.com/domain2 will redirect queries to that virtual site.
A 301 redirect will not work because that 301 message is passed back to the browser, which will not be able to access a non-publicly accessible domain.
I think the easiest solution for you would be to create symlinks inside the http://harry.dyndns-work.com/ document root.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.