Welcome! Log In Create A New Profile

Advanced

Wildcard Subdomain and Apache VirtualDocumentRoot pendant

Posted by michelangelo 
Wildcard Subdomain and Apache VirtualDocumentRoot pendant
May 24, 2012 07:10AM
Hi there!

I am new to nginx and I am figuring out how I can archieve a subdomain catch-all with some kind of VirtualDocumentRoot like I have it in Apache Webserver.

In the nginx conf I added already a subdomain catchall alá "server_name *.test.domain" but I am stuck with the VirtualDocumentRoot pendant part, as long there is something like that in nginx webserver, or how else could I archieve the same behaviour in nginx like in apache webserver?

For those who don't know what I mean: I wanna pass the subdomain automatically into a seperate folder, if I open nginx.test.domain, nginx webserver should pass it into the directory /home/nginx/www/ or if I open test.test.domain it shall pass it to /home/test/www and so on...

For some guidance I want to thank you in advance!
michelangelo
Re: Wildcard Subdomain and Apache VirtualDocumentRoot pendant
August 09, 2012 01:31PM
Hi,

Any luck in finding a resolution? I too am interested on how to implement this. In my case I am trying to add a *.mydomain.com, but after adding that to the config file. The site no longer works. I can't find anything on the log.

server_name mydomain.com *.mydomain.com;


Thank you,

Mark



Edited 1 time(s). Last edit at 08/09/2012 01:38PM by mgoltra.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 150
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready