LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-16-2005, 06:58 AM   #1
paul_mat
Member
 
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855

Rep: Reputation: 30
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
 
Old 04-16-2005, 12:07 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 68
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
 
Old 04-16-2005, 09:23 PM   #3
jax8
Member
 
Registered: Feb 2004
Location: Australia
Distribution: Ubuntu, Fedora 10
Posts: 632

Rep: Reputation: 31
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.
 
Old 04-16-2005, 11:09 PM   #4
paul_mat
Member
 
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855

Original Poster
Rep: Reputation: 30
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?)?
 
Old 04-17-2005, 12:37 AM   #5
jax8
Member
 
Registered: Feb 2004
Location: Australia
Distribution: Ubuntu, Fedora 10
Posts: 632

Rep: Reputation: 31
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.

Last edited by jax8; 04-17-2005 at 12:49 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail from Apache being rejected - Cannot route to sender apache@localhost.localdomain jimwillsher Linux - Networking 2 01-19-2006 12:41 AM
Apache Webserver 403 Forbidden Errors (User not in apache group?) Mankind75 Mandriva 4 07-08-2004 05:30 AM
can't get to my domain's site from LAN ew0kian Linux - General 4 08-02-2003 08:11 AM
Add domain's to my POP server timnew Linux - Networking 1 05-14-2003 01:13 PM
apache benchmarks (apache v13 / apache v20) ; large differences between benchmarking markus1982 Linux - Software 0 02-08-2003 10:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration