It looks like this might be working for me. http { server { listen 80; index index.html index.htm index.php; set $basepath "/var/www/vhosts"; server_name ~^(?<sub>.+?)\.(?<domain>.+)$; set $root $basepath/$domain/htdocs/www; # if the domain is missing a subdomain then the default path will fail if ( !-d $basepath/$domain/htdocs/www ){ rewrite ^ $scheme://wwwby aconway - How to...
I trying out NGinx for the first time after having a hard time trying to figure out this issue on Apache. I want to have a dynamic virtual host and dynamic sub domains So, I can have a domain and folder structure like the following. The redirect is working, but not the subdomains. www.domain.com => /var/www/vhosts/domain.com/htdocs/www domain.com => redirect to www.domain.com fooby aconway - How to...
![]() |
![]() |
![]() |
![]() |
|