Quantcast
Channel: Prevent using wildcard in Apache server alias setting - Server Fault
Viewing all articles
Browse latest Browse all 2

Prevent using wildcard in Apache server alias setting

$
0
0

This is a modified VirtualHost setting from my server.

<VirtualHost *:80>  ServerName example.com  DocumentRoot /mnt/example/public<Directory /mnt/example/public>    AllowOverride all    Options -MultiViews</Directory></VirtualHost>

I found that I can access the example.com and also *.example.com, e.g. www.example.com, abcde.example.com, etc.

I know there should be a ServerAlias setting which let me activate wildcard subdomain suppot. But I can't see the ServerAlias setting my VirtualHost or Apache config file.

I want to allow only www.example.com and example.com can access my site, and other subdomain will get a 404 error.

How can I set this up?

Thanks all. :)


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>