天天看点

centos7里nginx访问vsftp目录

cd /etc/nginx/conf.d

vi web.conf

    server {

        listen       80;

        server_name  localhost;

        location / {

            root   /opt/www/web;

            index  index.php index.html index.htm;

        }

        error_page   500 502 503 504  /50x.html;

        location = /50x.html {

        location ~ \.php$ {

            root           /opt/www/web;

            fastcgi_pass   127.0.0.1:9000;

            fastcgi_index  index.php;

            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;

            include        fastcgi_params;

}

目录在原先修改的nginx目录中新建一个web目录

cd /opt/www

mkdir web

chmod 777 web

cd /etc/vsftpd/user

vi web

local_root=/opt/www/web

write_enable=YES

anon_world_readable_only=NO

anon_mkdir_write_enable=YES

anon_upload_enable=YES

anon_other_write_enable=YES

systemctl restart vsftpd

systemctl restart nginx

浏览器端访问ftp://IP地址/即可,结合上面两篇文章看目录

本文转自 guowang327 51CTO博客,原文链接:http://blog.51cto.com/guowang327/1709500,如需转载请自行联系原作者