zoukankan      html  css  js  c++  java
  • 更改nginx站点根文件夹

    默认站点根文件夹为/usr/local/nginx/html。要将它改成/homw/www
    vi /usr/local/nginx/conf/nginx.conf
    将当中的

            location / {
                root   html;
                index  index.php index.html index.htm;
            }
    改为

            location / {
                root   /home/www;
                index  index.php index.html index.htm;
            }
    然后再将
    location ~ .php$ {
                root           html;
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                include        fastcgi_params;
            }
    改为
    location ~ .php$ {
                root           /home/www;
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                include        fastcgi_params;
            }
    然后重新启动nginx
    已经安装了samba,所以要将vi /etc/samba/smb.conf中的[public]下的path值改为
    path = /home/www/

    chown nginx(全部者):nginx(组) /home/www/ -R  #设置文件夹全部者

    chmod 700  /home/www/ -R   #设置文件夹权限



  • 相关阅读:
    jquery ajax
    对话:工作时常用的借口
    asp.net 加页面Loading效果
    (转)row_number( )、rank( )、,DENSE_RANK( )、ntile( )
    商务英语:出差用语
    怎样工作才能收入更多
    上班族下午如何才不瞌睡?
    (转)系统权限大致分类
    对话:办公室午餐时间
    如何建立一个“铁打的营盘”?
  • 原文地址:https://www.cnblogs.com/wzjhoutai/p/6725083.html
Copyright © 2011-2022 走看看