nginx安装vsftpd遇到的问题怎么解决
最简洁的安装步骤
[root@itdragon ~]# useradd ftpuser [root@itdragon ~]# passwd ftpuser changing password for user ftpuser. new password: bad password: it is too short bad password: is too simple retype new password: passwd: all authentication tokens updated successfully. [root@itdragon ~]# yum -y install vsftpd [root@itdragon ~]# ifconfig
第一步:添加ftp用户
第二步:设置ftp用户密码
第三步:安装vsftpd
第四步:查看ip地址
第五步:本地使用免费的filezilla 链接虚拟机
遇到的问题
连接失败
状态: 正在等待重试... 状态: 正在连接 192.168.0.11:21... 错误: 20 秒后无活动,连接超时 错误: 无法连接到服务器
不用灰心,安装本来就不是顺风顺水的,每个人会根据自己的环境出现不同的问题。下面是我的解决方法
首先,要确定两边能 pind 通,虚拟机选择的是桥接模式,能正常 ping 通。
然后,百度
网上有很多五花八门的解决方法,主要是针对三个方面的
这里我会贴出几个网址,因为我按照网站上面的做法没有连接成功,最后是关闭了防火墙才解决的。我对这块比较薄弱,就不误人子弟了。贴出来是为了以后方便以后修改。
第一个操作是关闭匿名,开启被动模式
第二个操作是开启防火墙的21端口
第三个操作是修改selinux,开启外网可访问
[root@itdragon ~]# vim /etc/vsftpd/vsftpd.conf anonymous_enable=no pasv_min_port=30000 pasv_max_port=31000 [root@itdragon ~]# service vsftpd restart [root@itdragon ~]# vim /etc/sysconfig/iptables -a input -p tcp -m multiport --dport 20,21 -m state --state new -j accept -a input -p tcp -m state --state new -m tcp --dport 21 -j accept -a input -p tcp --dport 30000:31000 -j accept [root@itdragon ~]# service iptables restart [root@itdragon ~]# getsebool -a | grep ftp allow_ftpd_anon_write --> off allow_ftpd_full_access --> off allow_ftpd_use_cifs --> off allow_ftpd_use_nfs --> off ftp_home_dir --> off ftpd_connect_db --> off ftpd_use_fusefs --> off ftpd_use_passive_mode --> off httpd_enable_ftp_server --> off tftp_anon_write --> off tftp_use_cifs --> off tftp_use_nfs --> off [root@itdragon ~]# setsebool -p allow_ftpd_full_access on [root@itdragon ~]# setsebool -p ftp_home_dir on
临时关闭防火墙不过瘾,直接永久关闭防火墙
[root@itdragon modprobe.d]# service iptables stop iptables: setting chains to policy accept: filter [ ok ] iptables: flushing firewall rules: [ ok ] iptables: unloading modules: [ ok ] [root@itdragon modprobe.d]# chkconfig iptables off
上传失败
在nginx 安装目录下创建了一个images文件夹,通过filezilla上传图片提示错误
响应:553 could not create file. 错误: 严重文件传输错误
解决方法如下
[root@itdragon html]# mkdir images [root@itdragon html]# chmod -r 777 images [root@itdragon html]# ll total 12 -rw-r--r--. 1 root root 537 nov 18 10:53 50x.html drwxrwxrwx. 2 root root 4096 nov 18 10:55 images -rw-r--r--. 1 root root 612 nov 18 10:53 index.html [root@itdragon html]# vim /etc/vsftpd/vsftpd.conf local_root=/var/ftp [root@itdragon html]# service vsftpd restart
注意点
网络要能ping通
防火墙的问题要处理好
不能创建文件问题
以上是nginx安装vsftpd遇到的问题怎么解决的详细内容。更多信息请关注PHP中文网其他相关文章!

热AI工具

Undresser.AI Undress
人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover
用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool
免费脱衣服图片

Clothoff.io
AI脱衣机

AI Hentai Generator
免费生成ai无尽的。

热门文章

热工具

记事本++7.3.1
好用且免费的代码编辑器

SublimeText3汉化版
中文版,非常好用

禅工作室 13.0.1
功能强大的PHP集成开发环境

Dreamweaver CS6
视觉化网页开发工具

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)

热门话题

确认 Nginx 是否启动的方法:1. 使用命令行:systemctl status nginx(Linux/Unix)、netstat -ano | findstr 80(Windows);2. 检查端口 80 是否开放;3. 查看系统日志中 Nginx 启动消息;4. 使用第三方工具,如 Nagios、Zabbix、Icinga。

启动 Nginx 服务器需要按照不同操作系统采取不同的步骤:Linux/Unix 系统:安装 Nginx 软件包(例如使用 apt-get 或 yum)。使用 systemctl 启动 Nginx 服务(例如 sudo systemctl start nginx)。Windows 系统:下载并安装 Windows 二进制文件。使用 nginx.exe 可执行文件启动 Nginx(例如 nginx.exe -c conf\nginx.conf)。无论使用哪种操作系统,您都可以通过访问服务器 IP

在云服务器上配置 Nginx 域名的方法:创建 A 记录,指向云服务器的公共 IP 地址。在 Nginx 配置文件中添加虚拟主机块,指定侦听端口、域名和网站根目录。重启 Nginx 以应用更改。访问域名测试配置。其他注意事项:安装 SSL 证书启用 HTTPS、确保防火墙允许 80 端口流量、等待 DNS 解析生效。

在 Linux 中启动 Nginx 的步骤:检查 Nginx 是否已安装。使用 systemctl start nginx 启动 Nginx 服务。使用 systemctl enable nginx 启用在系统启动时自动启动 Nginx。使用 systemctl status nginx 验证启动是否成功。在 Web 浏览器中访问 http://localhost 查看默认欢迎页面。

如何解决 Nginx 403 Forbidden 错误?检查文件或目录权限;2. 检查 .htaccess 文件;3. 检查 Nginx 配置文件;4. 重启 Nginx。其他可能原因还包括防火墙规则、SELinux 设置或应用程序问题。

在 Linux 中,使用以下命令检查 Nginx 是否已启动:systemctl status nginx根据命令输出进行判断:如果显示 "Active: active (running)",则 Nginx 已启动。如果显示 "Active: inactive (dead)",则 Nginx 已停止。

如何在 Windows 中配置 Nginx?安装 Nginx 并创建虚拟主机配置。修改主配置文件并包含虚拟主机配置。启动或重新加载 Nginx。测试配置并查看网站。选择性启用 SSL 并配置 SSL 证书。选择性设置防火墙允许 80 和 443 端口流量。

解决 Nginx 跨域问题有两种方法:修改跨域响应头:添加指令以允许跨域请求,指定允许的方法和头,以及设置缓存时间。使用 CORS 模块:启用模块并配置 CORS 规则,允许跨域请求、方法、头和设置缓存时间。
