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

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

问题描述

我真的不知道多少关于Apache,我跟着一些教程和安装LAMP堆栈。我可以成功的ftp到/ home / EC2用户和上传文件有,但我希望能够将文件上传到/ 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.

推荐答案

首先确保你可以写的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".

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

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