Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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 about 4 or 5 things that I'm going to combine into 1 topic. Probably not a great idea, but they are all very closely related, and rather than post multiple topics, I'll take the risk that some guru will know the answer to all my problems (and no, I'm not looking for Dr. Phil ).
And to preempt the search feature response: I did. But portions of this are VERY likely the case of not knowing the keywords to search for...
First off, the main point of the post, the subject you see above:
2a) To further the above, and complicate it:
How can I serve up a website from another box running apache when the url is typed as above. What I mean: When a visitor types http://domain.com they get served up a page from my main server. However, should they type http://olives.domain.com The second server serves up the pages for that subdomain (which seems to complicate #1 even more)?
2b) (How) Can I password protect this subdomain using an .htaccess file? Will that cause me too much heartburn, or is it even possible?
3) If DNS is involved with a portion of this (beyond setting up a basic association of domain.com to IP 1.2.3.4) any help in that area would be much appreciated as I've yet to get beyond the first chapter in DNS & BIND from O'Reilly.
Yeah, I think there were actually a few more related questions that I can't drum up right now, but I think that'll suffice.
Thanks for reading, and if you can supply an answer too, that would be great
I have the following (that may be pertinent):
Gentoo
Apache 2.0.x
PHP 4.3.9 (but thinking of updating tomorrow...)
Linksys WRT54G
1 WAN IP, several domains, several static LAN IP's, but the main server is 192.168.1.24 and the secondary is 192.168.1.80 if that helps in troubleshooting/examples.
2a) To further the above, and complicate it:
How can I serve up a website from another box running apache when the url is typed as above. What I mean: When a visitor types http://domain.com they get served up a page from my main server. However, should they type http://olives.domain.com The second server serves up the pages for that subdomain (which seems to complicate #1 even more)?
This is done using dns. you can just set up an entry for olives.domain.com that points to xxx.xxx.xxx.xxx. this file is usually /var/named/domain.com.db (provided you are using bind for DNS services) add a line like:
olives 14400 IN A xxx.xxx.xxx.xxx
(where 14400 is your TTL - your's may differ - and xxx.xxx.xxx.xxx is the server ip hosting 'olives')
Looking at your system specs, it looks like you are behind a cable/dsl router. If this is the case, you might be forced to have olives.domain.com run on a different port (only to the end user) .. eg: http://olives.domain.com:81 -- you would then set up a port forward on your router to direct all requests on port 81 to ip xxx.xxx.xxx.xxx (server running olives.domain.com)
Quote:
2b) (How) Can I password protect this subdomain using an .htaccess file? Will that cause me too much heartburn, or is it even possible?
3) If DNS is involved with a portion of this (beyond setting up a basic association of domain.com to IP 1.2.3.4) any help in that area would be much appreciated as I've yet to get beyond the first chapter in DNS & BIND from O'Reilly.
the answer i gave for 2a) should work ... but i'd read the book :P
If you have wildcards with your domain registrar then anything dotted before your domain name should get sent to your one server. From there you can set it up using virtual hosts in apache to either serve a different directory for that site or redirect the requests to another webserver. This involves no DNS modifications at all, aside from using wildcards for your main domain, and is done through the web server.
I'll leave it up to you to find the information on virtual hosts and redirectors in apache but here's a hint :-)
Distribution: WIN8.1 ENT, WIN SERVER 2012 R2, openSUSE 42.1 LEAP
Posts: 118
Rep:
..very funny..
..so - let's see:
..don't ask stupid q's again..?
..at least not until you know the answers yourself..?
..or just moderators getting bored with all the imbeciles..?
..one wooooonders..hmmmmm..
I wouldn't call it a stupid question. I think we just expected the moderators to know all the answers about everything so we are taken by surprise when they themselves have questions. Obviously without knowing which keywords to search for it's harder to find answers.
Distribution: WIN8.1 ENT, WIN SERVER 2012 R2, openSUSE 42.1 LEAP
Posts: 118
Rep:
no - no - no..i did not imply that MasterC was asking a stupid q..
i actually put a ? after that sentence..
my querry was merely - politely :-) - to find out if the thread from MasterC was a hidden hint, that there are too many 'silly' q's asked in this forum - which i btw indeed am doing myself..
i can't help getting the impression - from this thread - that many 'specialists' are fed up reading tons of - in their view - 'silly' q's..
..but i - for one - will most certainly continue asking - unaffected :-)
Originally posted by captain skywave ...I can't help getting the impression - from this thread - that many 'specialists' are fed up reading tons of - in their view - 'silly' q's..
I wouldn't really call myself a specialist but to me LQ is a place to exercise my Linux knowledge, kind of like going to the gym to stay in shape. I am able to go to the gym and happily ignore the latest aerobics fad, just as I am able to come here and find challenging questions that let me keep my Linux knowledge 'in shape' without having to bother with every 'silly question' I see posted.
The 'silly questions' that I respond to usually look like this:
Wow, I am really late on checking back up on this one, and am surprised and happy to see the responses it has. Thanks! The helpful hint/link was perfect, exactly what I need. I'll also look at the other responses, especially Apache's Proxying feature, sounds intreaguing.
No, this was not just a "notice all the stupid questions like this one" thread. It wouldn't be very welcomed to do that sort of thing around here, the place is a breading ground of knowledge and helpful wonderful people, no need to put down those asking, what one might consider, trivial questions. I do know quite a bit about varying parts of linux (after having spent the amount of time I have around LQ and really researching the questions that intreague me) and it's related parts, but having a major in depth knowledge of every single aspect is a rough thing to attain when I do it just as a hobbie (I'm a Pharmacy Tech by trade, a Linux geek by choice ).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.