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/
  • 相关阅读:
    cookie的路径
    cookie的生命
    cookie详解
    cookie简介&用途
    编码
    请求转发和重定向的区别
    request:域
    request:请求转发,请求包含
    常用的html语法
    request:获取请求的URL
  • 原文地址:https://www.cnblogs.com/irisrain/p/4309742.html
Copyright © 2011-2022 走看看