LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 07-29-2004, 10:00 PM   #1
gepesz
LQ Newbie
 
Registered: Jun 2004
Location: Washington DC, US
Distribution: Debian, Kubuntu
Posts: 23

Rep: Reputation: 15
How to disable all subdomain on apache2?


Hello gurus,

I have apache2 running on my Debian Sarge box. I just got my domain name and was about to setup subdomains under it when I realized that ALL subdomains are currently active!! This is what I want to disable.

For example, say I have a website under www.mysite.com. The problem is that all these requests go to the same website:

- mysite.com
- asdf.mysite.com
- anythinghere.mysite.com

How can I disable these subdomains? How can I disable ALL subdomains?
 
Old 08-01-2004, 04:44 AM   #2
zatriz
Member
 
Registered: Aug 2003
Location: Seattle, Wa
Distribution: Fedora,Trustix,Debian
Posts: 290

Rep: Reputation: 30
If every subdomain resolves to your ip address then The problem is not with apache but with your dns configuration at your domain provider. Its probably set to forward everything to your ip address just delete that mx record from you dns configuration or change it so that only www is set to be forwarded within that mx record.
 
Old 08-01-2004, 04:20 PM   #3
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 47
There are 2 systems working for http name resolution.. dns and url
(mx records are just for mail zatriz and won't apply to gepesz's http question)

dns tries to find a server that will match the url asked for, so you either delegate this to a dns provider, or do it yourself with your own dns server. Very few isps allow you to manage your subdomains remotely, but you can always ask them.. It's included in a commercial contract but not normally in a domestic contract.

If your isp by default resolves everything to your box, then apache has to filter it.
apache has virtual servers that match what you specify, and a default server that handles the rest.
If you want to stop the default page from being given for crazy http urls, make it a 404 ERROR page and only have valid virtual sites.

If you have your own dns server, you need to tell your isp to forward all requests to you so that you can manage all the subdomains yourself..

The difference between the 2 ideas is that with your own dns server, apache never gets a connection for a bad url, but the dns server does, which is less and faster traffic.
 
Old 08-01-2004, 05:52 PM   #4
zatriz
Member
 
Registered: Aug 2003
Location: Seattle, Wa
Distribution: Fedora,Trustix,Debian
Posts: 290

Rep: Reputation: 30
Sorry My mistake on the first post I meant A records not mx
 
  


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
How to create apache2 subdomain? gepesz Linux - Networking 3 09-20-2012 06:07 AM
how do i disable apache2 error banners? nazdrowie Linux - Security 2 01-19-2005 05:39 PM
how to uninstall apache2 which is installed by emerge apache2 flybirdlong Linux - Software 1 07-17-2004 12:46 PM
Subdomain help DoobyWho Linux - General 3 04-14-2003 07:51 PM
subdomain deepak Linux - Networking 2 03-01-2001 10:50 PM


All times are GMT -5. The time now is 03:57 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration