Two Web servers, Two MySqls in one Linux box Apache Centos
Hello all,
I am running a Linux Centos on the local network. The Apache and Mysql services are running on this Linux box. I can access the site by putting 192.168.0.22 in the browser from other computers in the network with no problem. Now I want to run another site in the same Linux box by assigning a virtual IP address, Apache and another Mysql and don't know how to. Basically, I want to run two web servers accessible in the same network in one Linux box. Any help is appreciated. Thank you all |
Sounds like you want to configure virtual hosts. Are you using Apache 2.0 or Apache 2.2 (or even 1.3)?
|
For whatever it's worth, you probably want:
1. Apache: a) One instance of Apache b) One "default" server, and one "virtual" server <= they'll look to the end-user as two completely separate sites c) It's common practice to configure the virtual server by name (rather than by IP) d) In either case, you'll probably want DNS, too 2. MySQL: a) again: you're probably better off with *one* instance b) simply create multiple databases c) if, for whatever reason, you indeed want multiple instances of MySQL co-located on the same server, then d) you'll need to run them on different ports, and (slightly) tailor your default configuration |
I have Apache 2.2.3. I installed Centos and installed all the updates.
|
How can i configure the virtual server by name rather than by IP, Apache and DNS? Can anyone tell me step by step where to go and make such changes? Thank you all.
|
The link I provided above gives both name based and IP based virtual hosting instructions
|
I have done the Apache part. Could someone tell me how to configure the DNS stuff? I have to assign the virtual IP address too correct? How virtual ip/server can be assigned?
|
Are you talking about your own DNS server or the dyndns stuff?
If you're using http and not https (SSL), then you can do it with name based virtual hosts and one IP address. In which case just set up custom entries for both domains on dyndns and have them point to the IP address of your router. |
Thank you for your response. Yes I am using http. Could you tell me step by step how to set up custom entries for both domains on dyndns and have them point to the IP address of my router? I am very new to Linux. This will be in a local network behind the router. Thank you.
|
Anyone can help me please?
|
|
The server I am trying to put together is at home behind the router for testing purposes only. Do I still need this?
http://www.dyndns.com/services/dns/custom/ |
Hello all,
MySQL is configured correctly and running. I managed to do one web server. I also managed to configure one virtual IP address by typing: cd /etc/sysconfig/network-scripts and cp ifcfg-eth1 ifcfg-eth1:1. Assigned static IP address to eth1 192.168.0.182 and 192.168.0.183 on eth1:1 with respective subnetmask 255.255.255.0 and default gateway 192.168.0.1. In /var/www/html, I have two folder called server1 and server2. These two folders have the necessary files and folders to run the apache webservers. I launched the sript from the browser http://192.168.0.182/install and installed the script on one webserver successfully however when I try to launch the browser to install other server script http://192.168.0.183/install nothing happens. The connection gets timed out. Can anyone tell me what am I missing here? Thank you all. Here is the httpd configuration is below now and I have tried putting IP addresses into <VirtualHost 192.168.0.182> and no success: <VirtualHost *> DocumentRoot /var/www/html/server1 ServerName development.mysite.com </VirtualHost> <VirtualHost *> DocumentRoot /var/www/html/server2 ServerName development.mysite.com </VirtualHost> |
All times are GMT -5. The time now is 05:15 AM. |