AWS EC2 FTP/HTML [英] AWS EC2 FTP / HTML

查看:49
本文介绍了AWS EC2 FTP/HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的不太了解 Apache,我跟着一些教程安装了 LAMP 堆栈.我可以成功地 ftp 到/home/ec2-user 并在那里上传文件,但我希望能够将文件上传到/var/www/html 或者只是在某个地方我可以使用我的帐户将文件上传到网络.

I really don't know much about Apache, I followed some tutorials and installed the LAMP stack. I can successfully ftp to /home/ec2-user and upload files there but I want to be able to upload files to the /var/www/html or just have somewhere where I can upload files to the web with my account.

对不起,如果我的问题不是很有帮助,但我对服务器的教育不够,无法提供更多信息.问我问题,我会尽力而为.

Sorry if my question is not very helpful but I'm not educated enough on servers to provide more information. Ask me questions and I will do my best.

推荐答案

首先确保您可以写入文档根目录(在本例中为/var/www/html)EC2 上用户ec2-user"的默认组是ec2-user"&轮子"

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-user"对/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-user 中创建一个指向 docroot 的符号链接.

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

当您在 ftp 客户端上进行身份验证时,只需双击看起来像docroot"文件夹的内容.

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".

这篇关于AWS EC2 FTP/HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆