Welcome! Log In Create A New Profile

Advanced

variable which catch current directory of vhost config

Posted by puregreen 
variable which catch current directory of vhost config
February 23, 2013 04:34PM
Hi,
I would like to do something like this:

I have got my website at this directory
/home/www-data/my-domain.com

i have got my vhost config at
/home/www-data/my-domain.com/nginx.config

I have got at /etc/nginx/nginx.conf something like this
include /home/www-data/*/nginx.conf;

It would be great if i could use variable which catch directory name (which is vhost, server name, and root path) where my vhost nginx.config exist, then i shouldn't write config for every websites which is at /home/www-data/ direcotry, i could use the same nginx.config

Is it possible with nginx to catch this directory? Or any other way?

I would like to have in nginx something like __DIR__, and end(explode("/",__DIR__) in PHP for every included vhost config files



Edited 1 time(s). Last edit at 02/23/2013 04:40PM by puregreen.
Re: variable which catch current directory of vhost config
February 24, 2013 02:51AM
is it possible?
Re: variable which catch current directory of vhost config
March 02, 2013 10:12AM
Dead forum?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 97
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready