LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-22-2004, 02:15 AM   #1
peteABK
Member
 
Registered: May 2003
Location: Canada
Distribution: Fedora 13
Posts: 49

Rep: Reputation: 15
another apache and routers


Hello,

just a quick question about Apache and my router. I have a Dlink 604 splitting requests based on ports.

I have two computers running apache, one listening to 80 and the other 443, requests get properly forwarded through the router.

I set up a little vHost on the comp listening to port 80 that makes requests for the subdomain "http://secure.mydomain.com" rewrite to "https://secure.mydomain.com" and it forwards over nicely. But I also noticed that I can type "https://anything.mydomain.com" and it goes through to the apache running on 443, like it should.

Problem is I only want it to respond to just one subdomain, I set the hostname in the apache conf, but it didn't seem to change anything. I was just wondering if there is something else I should be looking for. Thanks.
 
Old 12-22-2004, 10:24 AM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
How does your DNS record look like? Does only secure.example.com go to the router's IP or is it set up to redirect all *.example.com there?
 
Old 12-22-2004, 12:47 PM   #3
peteABK
Member
 
Registered: May 2003
Location: Canada
Distribution: Fedora 13
Posts: 49

Original Poster
Rep: Reputation: 15
Thanks for the quick reply,

I have the following records on my DNS server:
www.mydomain.com.
mydomain.com. <-- This would drive all traffic for this domain to my router right?
mail.mydomain.com.
secure.mydomain.com.
ns1. mydomain.com.
ns2.mydomain.com.

I just thought that if I set up apache the way I did, it would respond with a 404 page when I entered in some other domain.
Thanks for the help
 
Old 12-22-2004, 02:52 PM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
If it points to the router, yes. Probably specifying a virtualhost for all different cases (non-www.example.com) will solve it.
 
Old 12-22-2004, 04:12 PM   #5
peteABK
Member
 
Registered: May 2003
Location: Canada
Distribution: Fedora 13
Posts: 49

Original Poster
Rep: Reputation: 15
Ok, right now I'm not using vHosts for this server. So because it's running in ssl mode, I would have to use the IP addresses as the virtual host right? or can I use name virtualhost when running only one? thanks again for the reply
 
Old 12-24-2004, 05:05 PM   #6
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
You have two domains in fact, normal and secure. I'd use name virtualhosts.
 
  


Reply



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
can i have more than 1 routers? dimgr Linux - Wireless Networking 19 11-21-2004 01:47 PM
routers ralisch General 16 07-18-2003 03:14 PM
Routers... bac()n Linux - Newbie 3 03-28-2003 11:26 PM
routers jiplen Linux - Networking 5 09-02-2001 07:45 AM
Routers pradeep_nair Linux - Networking 1 03-29-2001 11:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:04 PM.

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