where is Nginx Subdomain Configuration file to change Subdomains DOCRoot Path ?

rnc

Verified User
Joined
Jun 8, 2013
Messages
72
Hello
i have a server that have 3 disk installed and i mount 1st disk as home and created a single account on that
also i mount 2nd and 3rd disk as a directory in that user home directory ( disk2/ disk3/)

as this account will have subdomian for files
ex : sub1.domain.com files are located in /home/username/public_html
and sub2.domain.com files are located in /home/username/public_html/disk2

i need to change document root of these sub domain to these Disk2 and disk2,3 mount points instead of default folder in domain root
but i cant find nginx configuration files for sub domain ( it is not in /usr/local/directadmin/data/users/username/nginx.com

i saw
http://help.directadmin.com/item.php?id=199 and http://help.directadmin.com/item.php?id=3

but as i understand this is for Apache and make cahanges buy template so they will not overwritten in future ./build rewrite_cons

so
where is directadmin subdomains nginx confs ! ? im ok need to made changes on them manually
 
You can do the same for nginx_server_secure.conf and nginx_server_secure_sub.conf files in /usr/local/directadmin/data/templates (don't forget to copy them to /usr/local/directadmin/data/templates/custom).
 
hello
thanks for good reply as always
i copied this fiel to custom
but could you please explain a little bit more how i tell nginx that root directory of sub1.domain.com is in /home/username/public_html/disk2/sub2 and not in /home/username/public_html/sub2 ?
i want to do this for 8 subdomain on a single domain ( 8 subdomain that their home directory must be places in root , disk2 and disk3 )
ex
sub1.domain.com files are located in /home/username/public_html
sub2.domain.com files are located in /home/username/public_html/disk2/sub2
sub3.domain.com files are located in /home/username/public_html/disk2/sub3

sub4.domain.com files are located in /home/username/public_html/disk3/sub4
 
I'd suggest changing SDOCROOT instead of DOCROOT then. Like:
Code:
|*if SUB="sub2"|
|?SDOCROOT=/home/username/public_html/disk2/sub2|
|*endif|
 
I'd suggest changing SDOCROOT instead of DOCROOT then. Like:
Code:
|*if SUB="sub2"|
|?SDOCROOT=/home/username/public_html/disk2/sub2|
|*endif|

Hello and thanks
i get this ! this is a IF !
just for clerification and because document did not expalind it and for future usage for others

we have to put JUST name OF subdomain it self in |*if SUB="sub"| not the whole sub.domian.com

and do i need to run rewrite_confs command ?!

does add extra configuration as http://help.directadmin.com/item.php?id=199 mentioned in Admin Panel -> Admin Settings -> Customize Httpd Configurations. work for nginx too !?
or i need to edit NGINX configuration manually from SSH ?
 
After changes in templates, rewrite is needed. About the custom httpd configuration: yes, this feature works for nginx too :)
 
Back
Top