Is it possible using multiple directive on different root location? (Without Symlinks)

antituhan dewanggaba at gmail.com
Wed May 2 02:20:17 UTC 2012


If using alias, what the root document directive? Becasue public_html is
outside the /home/antituhan/static. I've tried using alias
/home/antituhan/public_html but the nginx shows errors not found. Any
solution ?


Cliff Wells wrote
> 
> Perhaps an alias?
> 
> location /cdn/ {
>     alias /home/antituhan/public_html/;
> }
> 
> Cliff
> 
> On Tue, 2012-05-01 at 02:36 -0700, antituhan wrote:
>> Hi, basic on http://wiki.nginx.org/Pitfalls, I want to ask my directives
>> like
>> this :
>> 
>> This directive on balancer :
>> 
>> 
>> And then, this directives on backend :
>> 
>> 
>> I want to give a subdomain like this http://static.antituhan.com/cdn, and
>> /cdn will have a root dir to /home/antituhan/public_html/, and now I use
>> symlink to static :
>> 
>> 
>> So, I can access the domain like this http://static.antituhan.com/cdn
>> 
>> If I don't use symlink, is it possible to add another directive on nginx?
>> And if is not possible, is it safe for nginx directive? Thank you
>> 
>> -----
>> [daemon@ ~]# 
>> --
>> View this message in context:
>> http://nginx.2469901.n2.nabble.com/Is-it-possible-using-multiple-directive-on-different-root-location-Without-Symlinks-tp7516384.html
>> Sent from the nginx mailing list archive at Nabble.com.
>> 
>> _______________________________________________
>> nginx mailing list
>> nginx@
>> http://mailman.nginx.org/mailman/listinfo/nginx
> 
> 
> 
> _______________________________________________
> nginx mailing list
> nginx@
> http://mailman.nginx.org/mailman/listinfo/nginx
> 


-----
[daemon at antituhan.com ~]# 
--
View this message in context: http://nginx.2469901.n2.nabble.com/Is-it-possible-using-multiple-directive-on-different-root-location-Without-Symlinks-tp7516384p7518776.html
Sent from the nginx mailing list archive at Nabble.com.



More information about the nginx mailing list