Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Thus i'm trying to make two default apache virtualhosts as it were... in such a way that if a request goes to one IP address or the other... thats the document route it goes to... would the above work without a ServerName directive? So that both virtual hosts can catch requests on the specific IP and then send it to the corresponding DocRoot
If no ServerName is specified, then the server attempts to deduce the hostname by performing a reverse lookup on the IP address. If no port is specified in the ServerName, then the server will use the port from the incoming request. For optimal reliability and predictability, you should specify an explicit hostname and port using the ServerName directive.
If you are using name-based virtual hosts, the ServerName inside a <VirtualHost> section specifies what hostname must appear in the request's Host: header to match this virtual host.
See the description of the UseCanonicalName directive for settings which determine whether self-referential URL's (e.g., by the mod_dir module) will refer to the specified port, or to the port number given in the client's request.
Yea thanks, i had already read that of course. And can't see that it really answers my question, reverse DNS wouldn't really work in the instance i'm talking about... perhaps you can explain it a bit more... i'm looking more at IP based virtual hosts in the hope that i can achieve basically setting lots of DNS names at one VH and another load of DNS names at another VH and then depending on which DNS name typed in depends of course on what IP address you hit, and then depending on the IP address hit i'm hoping that any request to that IP address will be taken to it relevent DocRoot... i guess this is something i could just test with out asking here.... but i thought it would be best to try and understand more on what i'm trying to achieve because i couldn't see anything on the apache docs and other places that relate to what i'm trying to achieve.
do you have those ip added to your apache server network interface ?
Erm, currently no... they are just examples... i would have something along those lines if people say its a feasibly possible to do what i'm trying to achieve. IP addresses and it would be a very small amount so no chance of exhausting the system... would be added using IP alias addresses probably.
yeah with lan ip set in the container you can have many many web use with
ip , but for me better you named base , but if still need to use ip then
the ip also must be aliases in the NIC
in the lan also you can use named base provided you have your local dns
set point domain to local ip and another part is in /etc/hosts in that
We are currently using name based but this is not ideal when you start to get so many files, especially when they all point to the same place. Thats why it would be nice if requests going to one IP could all goto one DocRoot and it accepting all DNS / hostnames on that IP. And same on the other regardless of what hostname is set in the header because its been received on that other IP address then the Virtualhost should send it to the other DocRoot.
Without the need for any DNS entries anywhere... i'd have thought this was possible but maybe i'm wrong? Its certainly possible if setting up a second apache instance or whatever because you can just set the _default_ and then send all requests to that. But i'm trying to get a similar thing done without needing a second apache instance but still catching everything to either one or the other DocRoot?