You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

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:

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.

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.