What's the best way to add wildcard subdomains to nginx?
-
I've just started using nginx on my personal server, and I'd like to redirect a DNS wildcard *http://.socialuxe.com to various directories on my server (say http://ads.socialuxe.com to /ads/, etc.) Should I use some type of nginx rewrite rule?
-
Answer:
something like: if ( $host *~ (.*)\.socialuxe.com) { set $dir $1; rewrite (.*) $dir/$1; }
Martin Redmond at Quora Visit the source
Related Q & A:
- What's the best way to get into the Graphic Design industry?Best solution by Yahoo! Answers
- What's the best way of returning damaged NIKE shoes to NIKE for another pair?Best solution by Yahoo! Answers
- What's the best way to hook up an overhead projector to a laptop?Best solution by Yahoo! Answers
- What's the best way to whiten your teeth?Best solution by Yahoo! Answers
- What's the best way to start a small clothing line business?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.