且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

AWS EC2 FTP / HTML

更新时间:2022-11-06 21:06:02

首先确保你可以写的DocumentRoot(在/ var / www / html等在这种情况下) 在EC2上的默认组用户EC2用户是EC2用户&放大器; 车轮

First make sure you can write to the documentroot (/var/www/html in this case) The default groups for user "ec2-user" on EC2 is "ec2-user" & "wheel"

要么给用户EC2用户的/ var / www / html等的使用下面的命令所有权​​

Either give user "ec2-user" ownership of /var/www/html with the following command

sudo chown -R ec2-user /var/www/html

或组轮的所有权和写入权限

Or group "wheel" ownership and write permissions

sudo chgrp -R wheel /var/www/html
sudo chmod g+w /var/www/html

第二步是设置你的FTP客户端(FileZilla中,Cyber​​duck的,...),默认到/ var / www / html等 或创建在主目录EC2用户指向文档根目录的符号链接。

Second step is to set your FTP client (Filezilla, CyberDuck, ...) to default to /var/www/html or create a symbolic link in the home directory ec2-user pointing to docroot.

ln -s /var/www/html ~/docroot

在authenicate您的FTP客户端,只需双击是什么样子的文档根目录文件夹。

When you authenicate on your ftp client, just doubleclick on what looks like the "docroot" folder.

一个需要注意的是,你的DocumentRoot可能没有配置为在/ var / www / html等,请检查您的配置,/etc/httpd/conf.d/*.conf标有的DocumentRoot。

One caveat is that your DocumentRoot may not be configured as /var/www/html, please check your configurations in /etc/httpd/conf.d/*.conf labeled with "DocumentRoot".