阿娇开发978 发表于 2018-11-16 13:16:00

centos7里nginx访问vsftp目录

  cd /etc/nginx/conf.d
  vi web.conf
  server {
  listen       80;
  server_namelocalhost;
  location / {
  root   /opt/www/web;
  indexindex.php index.html index.htm;
  }
  error_page   500 502 503 504/50x.html;
  location = /50x.html {
  root   /opt/www/web;
  }
  location ~ \.php$ {
  root         /opt/www/web;
  fastcgi_pass   127.0.0.1:9000;
  fastcgi_indexindex.php;
  fastcgi_paramSCRIPT_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地址/即可,结合上面两篇文章看目录

页: [1]
查看完整版本: centos7里nginx访问vsftp目录