Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Wildcard subdomains pointing each one to a folder with the same name as subdomain

$
0
0
Hello, nowadays I add a block for each subdomain like this:

server {
server_name instigado.hifolio.com;
root /home/hifolio/public_html/instigado;
include miolo.conf;
}

server {
server_name danca.hifolio.com;
root /home/hifolio/public_html/danca;
include miolo.conf;
}

server {
server_name smartgrids.hifolio.com;
root /home/hifolio/public_html/smartgrids;
include miolo.conf;
}


Is there some way of doing the same using wildcards, like using a regexp on $host variable or something like that?
Thank you very much.

Dimitre

Viewing all articles
Browse latest Browse all 4759

Trending Articles



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