How do I configure my Apache web server to respond only to requests made to it's domain name and not the IP address?

feral_fenrir

I would like my server to not serve the home page when it is accessed by its IP address.

This is to prevent worms from spidering the site. Worms randomly scan for IP addresses and they might spot the site. If the site only responds to domain names, then most worms that just scan for IP addresses will not reach the site.

How could a web server be configured to respond only to the requests made to the domain name and not the IP address?

WhiteWinterWolf

You must define what is called a catch-all domain.

The exact configuration depends on the web server type and version you use, for instance on Apache 2 it will go through the definition of a _default_ vhost.

The idea though remains always the same:

  • You define several virtual hosts (or the equivalent depending on your web server software) matching each one a domain you handle,
  • You define one catch-all virtual host which will match any other domain and will ensure the default behavior for your server (reject the connection, redirect to a proper default URL, etc.).

Once you know the name, "catch-all domain", you should have no difficulties to check your web server documentation or online How-to's to learn how to implement this feature in your own environment.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

I have a domain name that I want to redirect to my local server. How do I do this?

분류에서Dev

How do i configure samba on my Ubuntu Server 14.04

분류에서Dev

How can I get my external IP address in a shell script?

분류에서Dev

Google search result is displaying ip-address instead of domain name

분류에서Dev

How do I suppress the method name from my xml in a WCF Web Service?

분류에서Dev

How to give a domain name to a local ip?

분류에서Dev

How do I get user's full name to display in my Visual Basic application?

분류에서Dev

Unix: How to Test Ip Address is resolved to name

분류에서Dev

How can I configure such that I can always SSH to my system over the internet on a dynamic IP?

분류에서Dev

How do I resize my Plotly bar height and show only bar’s edge (in subplot)?

분류에서Dev

How can I get my public IP address from the command line, if I am behind a router?

분류에서Dev

How do I know all the ip address used by the ip cameras in the network

분류에서Dev

how to read ipconfig, how to figure out what's my ip address?

분류에서Dev

Modem only allows outgoing traffic from specific IP, how should I configure the switch behind it?

분류에서Dev

How do I tell my internal IP to send to my external IP?

분류에서Dev

How do I setup a virtualbox server with a static ip?

분류에서Dev

Need to fill in IP address of the Server in my Clients Connection EditText

분류에서Dev

How can I own an IP address?

분류에서Dev

How do I configure irssi?

분류에서Dev

How do I purge my root domain from Amazon Cloudfront CDN - and should I?

분류에서Dev

How to setup domain email address forwarding to my private email?

분류에서Dev

How can I find vendor name from MAC address of my NIC

분류에서Dev

Finding my network's public IP address range

분류에서Dev

Apache 2.4 How to restrict a site to a single IP address

분류에서Dev

How do I configure module name when WebEssentials generates Typescript Intellisense file?

분류에서Dev

How to resolve a remote computer name to get it IP address in java

분류에서Dev

How do I respond to a terminal prompt before it is asked?

분류에서Dev

Assign a domain name to a static IP

분류에서Dev

How do I configure APN settings on my QMI-based 4G modem?

Related 관련 기사

  1. 1

    I have a domain name that I want to redirect to my local server. How do I do this?

  2. 2

    How do i configure samba on my Ubuntu Server 14.04

  3. 3

    How can I get my external IP address in a shell script?

  4. 4

    Google search result is displaying ip-address instead of domain name

  5. 5

    How do I suppress the method name from my xml in a WCF Web Service?

  6. 6

    How to give a domain name to a local ip?

  7. 7

    How do I get user's full name to display in my Visual Basic application?

  8. 8

    Unix: How to Test Ip Address is resolved to name

  9. 9

    How can I configure such that I can always SSH to my system over the internet on a dynamic IP?

  10. 10

    How do I resize my Plotly bar height and show only bar’s edge (in subplot)?

  11. 11

    How can I get my public IP address from the command line, if I am behind a router?

  12. 12

    How do I know all the ip address used by the ip cameras in the network

  13. 13

    how to read ipconfig, how to figure out what's my ip address?

  14. 14

    Modem only allows outgoing traffic from specific IP, how should I configure the switch behind it?

  15. 15

    How do I tell my internal IP to send to my external IP?

  16. 16

    How do I setup a virtualbox server with a static ip?

  17. 17

    Need to fill in IP address of the Server in my Clients Connection EditText

  18. 18

    How can I own an IP address?

  19. 19

    How do I configure irssi?

  20. 20

    How do I purge my root domain from Amazon Cloudfront CDN - and should I?

  21. 21

    How to setup domain email address forwarding to my private email?

  22. 22

    How can I find vendor name from MAC address of my NIC

  23. 23

    Finding my network's public IP address range

  24. 24

    Apache 2.4 How to restrict a site to a single IP address

  25. 25

    How do I configure module name when WebEssentials generates Typescript Intellisense file?

  26. 26

    How to resolve a remote computer name to get it IP address in java

  27. 27

    How do I respond to a terminal prompt before it is asked?

  28. 28

    Assign a domain name to a static IP

  29. 29

    How do I configure APN settings on my QMI-based 4G modem?

뜨겁다태그

보관