nginx����Ŀ¼����
nginxò��û������Ŀ¼��˵������Ϊ��������������ȫȫ����Ŀ¼�����Ʋ������ġ�
������Ҫ��nginx����һ������Ŀ¼��˵�����Ǿ�ֻ��alias��ǩ�Ƚ�“��”���ɴ���˵˵alias��ǩ��root��ǩ�������ɡ�
��������������aliasָ����Ŀ¼��ȷ�ģ�root��ָ��Ŀ¼���ϼ�Ŀ¼�����Ҹ��ϼ�Ŀ¼Ҫ����locationָ�����Ƶ�ͬ��Ŀ¼�����⣬����ǰ��������ʹ��alias��ǩ��Ŀ¼���в���ʹ��rewrite��break��
˵�����ף��������ã�
location /abc/ {
alias /home/html/abc/;
}
�����������£�http://test/abc/a.html ��ָ������ /home/html/abc/a.html�������������ɸij�
location /abc/ {
root /home/html/;
}
������nginx�ͻ�ȥ��/home/html/Ŀ¼�µ�abcĿ¼�ˣ��õ��Ľ�������ͬ�ġ�
���ǣ������Ұ�alias�����øijɣ�
location /abc/ {
alias /home/html/def/;
}
��ônginx������/home/html/def/ȡ���ݣ��������û�����ֱ��ʹ��root���ã�������Ҫ���ã�ֻ����/home/html/�½���һ�� def->abc����link�����ݷ�ʽ���ˡ�
һ�������£���location /������root����location /other������alias��һ����ϰ�ߡ�
����alias��root���������ҹ��ƻ�û��˵��ȫ������������ʱ�����������⣬�����������������ԡ�
ԭ�ģ�http://www.sudone.com/nginx/nginx_alias.html
�Լ�ʵ���ܽ
1��ʹ��aliasʱĿ¼������һ��Ҫ��“/”
2��nginx��resin������Ŀ¼������ʵĿ¼ͬ��ʱ������Ŀ¼����ʵĿ¼���ȼ�Ҫ�ߡ�
3��ǰ��nginx������Ŀ¼������resin��ʵĿ¼ͬ��ʱ������resin��ʵĿ¼���ȼ�Ҫ��(��ʹresinҲ������ͬ���ı���)��
4��nginx+resin/tomcat���Ϲ����У�����Nginx������Ŀ¼������ȷ����jsp����������
- ת����ע����Դ��ITѧϰ�� ��ַ��http://www.t086.com/ �����������Ƽ�������
- �ر������� ��վ�������ر�������ֹת�ص�ר�������������¿�������ת�أ���������ע��������ԭʼ���ߡ����°�Ȩ������ԭʼ�������С����ڱ���վת�����µĸ��˺���վ�����DZ�ʾ������л�⡣������վת�ص������а�Ȩ��������ϵ���ǣ����ǻᾡ�����Ը�����
- ��һƪ��linux TCP ��������
- ��һƪ��svn����Ŀ¼
- �鿴2011��03�µ����¹鵵