Use wildcards in nginx valid_referers
June 24, 2011 by admin · Leave a Comment
Here is a good tutorial show you how to Use wildcards in nginx valid_referers:
This quick post will show how we can easily allow only certain http referrers see some location using nginx. This might be useful for example if you are using nginx as a static content provider and want to not allow everyone hot-linking your images and only your own sites.
Nginx Subdomains Gotcha
June 24, 2011 by admin · Leave a Comment
Here is a good tutorial show you about Nginx Subdomains Gotcha:
I was trying to set up a subdomain, photos.kylebanker.com, using nginx. No problems, until I realized that *.kylebanker.com (e.g., whatever.kylebanker.com) was resolving to the content at photos.kylebanker.com. Here’s my initial configuration. Do you see the what’s wrong?
Handle wildcard subdomains with PHP
June 24, 2011 by admin · Leave a Comment
Here is a good tutorial show you how to Handle wildcard subdomains with PHP:
Subdomains can be a very handy way to make your urls more friendly looking. They can also be incredibly useful for membership driven websites to allow members to have their own custom subdomain. But how do make manage dynamic subdomains with PHP?
There is two parts to making dynamic subdomains work in this case. The first is updating your DNS and webserver to expect wildcard requests. On the DNS side its a simple matter of adding * as an ‘A’ record, or cname pointing to the primary domain or IP. In most cases if you are using shared hosting, you’ll need to contact your hosting provider to enable wildcard DNS on your account. Otherwise if you are on a dedicated server or virtual private server, this can be most likely handled by yourself, such as editing the DNS zone in WHM.