Apache sub domain's
hi there everyone,
i've got apache setup to run as my web server on 'computer A' then i have several computer on my LAN computer's B threw F. now one each of these computers i have windows XP pro and they all have IIS & remote desktop running on them. now i have copied the files required to run the web interface to the XP pro remote desktop onto my apache we server so i can visit my website from outside my LAN but when i type in 'computer B'i dont' get it, it can't find computer B, so i was looking into was making sub domain's for all of my computers and maybe somehow get apache to link to them or something. www.mydomain.com --- apache server compb.mydomain.com --- first xp machine compc.my.domain.com --- second XP machine etc etc etc so i can access my xp machine's from outside of my network? i was just wondering if that was possible, or if there was another way of doing this, this is just what i'm thinking of if it's not right or there are other ways of doing this that'd be great to know as well |
You can do it but if you only have ome IP you will need to set apache up as a proxy:
http://httpd.apache.org/docs-2.0/mod/mod_proxy.html |
You can use ports to access each of your machines.
For example Computer A may be listening on port 3000 so when you want to access the computer you use yourdomain.com:3000 and computer b is listening on port 3001 yourdomain.com:3001 and the Apache server listening on port 80 (default), so you can access by yourdomain.com:80 or just yourdomain.com You will have to change the configuration files of the computers that are listening on ports other than 80 and make them listen on their respective ports instead. You will also have to set up one of the computers as a router and route all requests on port 3000 to computer1, all requests on port 3001 to computer 2 etc. The routing machine will also need to be the machine that the domain name is pointed to. |
hi there jax8,
i'm interested in giveing what you said a go, but i'm not really sure on how to do this, could you give me a few more details? my apache machine is already running on port 80 (by default) with the address www.mydomain.com, now i'm still a bit of a newbie when it comes to apache, so could you explain or maybe send me to a how-to on what to do in some detail. how do i change the configuration files of the computers that are listening on ports other than 80 and make them listen on their respective ports instead? (remmebering there XP machines) i have a router setup, but how do i set it up to route all requests on port 3000 to computer1 (is that useing iptables?)? |
To change the port Apache listens on you have to edit the
http.conf file and change the line that says # # Port: The port to which the standalone server listens. # Port 80 to # # Port: The port to which the standalone server listens. # Port 3000 then you have to restart apache using the command apachectl restart The windows machines will be different because they are running IIS. I don't know how to do this because I dont use IIS , however it will be fairly simple to do. Open up IIS and browse through the options until you find something that specifies the port. Currently both the windows machines will be listening on port 80 so you will have to change these to 3000 and 3001, or whatever numbers you want (don't use reserved ports though like 21 etc). Save and restart IIS, you should now need to type http://YourIPaddress:3000 to access the first windows machine, http://YourIPaddress:3001 to access the second windows machine and just http://YourIPaddress to access the apache machine because it is listening on port 80 (you can change this though as explained above). The routing can be done via your ADSL router or whatever you are using. Anything coming on port 3000 you want to redirect to the IP address of your windows machine 1. Anything coming on port 3001 you want to redirect to the IP address of your windows machine 2. Anything coming on port 80 you want to redirect to the IP address of your linux machine running apache. You will need to use the port redirection feature of your router to do this. You can usually log on to your router using a web browser. If your connection comes straight into one of your machines you will need to use IP tables to route traffic. There should be some nice GUIs to route traffic out there somewhere as well. |
All times are GMT -5. The time now is 12:36 PM. |