我很难在我的EC2微实例上尝试设置SSL证书(这是从NameCheap追溯的Comodo PositiveSSL)(我使用的是基于CentOS的Amazon Linux AMI 2012.3,如果我没有弄错的话).
这是我做的:
我安装了mod_ssl和OpenSSL
我在EC2的实例安全组上启用了端口443
我按照Comodo的建议将*.key和*.crt文件修改为777
我确定IP地址和文件路径是正确的(在示例中放了一堆0但在我的ssl.conf中它是正确的)
我将此VirtualHost条目添加到ssl.conf中
<VirtualHost 00.000.000.00:443>
############# I tried both with & without this section ##############
ServerName www.mydomain.com:443
ServerAlias www.mydomain.com
DocumentRoot /var/www
ServerAdmin webmaster@mydomain.com
######################################################################
SSLEngine on
SSLCertificateKeyFile /etc/ssl/mydomain_com.key
SSLCertificateFile /etc/ssl/mydomain_com.crt
SSLCertificateChainFile /etc/ssl/mydomain_com.ca-bundle
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
然后我重新启动了apache ......但我仍然无法访问 https://www.mydomain.com/ !!!
它说,我检查过ssltool.com
The Common Name on the certificate is: ip-00-00-00-000
The certificate chain consists of:
SomeOrganization, ip-00-00-00-000. Expires on: Apr 10 13:39:41 2013 GMT - that's 363 days from today.
The site …Run Code Online (Sandbox Code Playgroud) 我想启动EC2 Windows实例,上传EXEecutable并执行它(所有这些都是自动化的,这很重要)
到目前为止,我能够以编程方式启动EC2 Windows实例并获取其参数(密码/ IP),现在我想找到一种方法来上传这个可执行文件(从我的Windows机器或我的其他EC2 linux实例)并运行它.
我考虑过启动RDP连接并使用宏软件上传和执行文件,但根据以前的经验,这是一个糟糕/脆弱的方法,至少可以说.
我还想过将这个EXE上传到服务器,然后在Windows上做这样的事情:
wget http://www.domain.com/my-file.exe
Run Code Online (Sandbox Code Playgroud)
除了Windows 没有 wget!
所以我的问题是:有没有办法在EC2 Windows实例中以编程方式上传和执行EXEcutable?
(我是亚马逊AWS/S3的新手,所以请耐心等待我)
我的最终目标是允许我的用户使用他们的网络浏览器将文件上传到S3,我的要求是:
我的两部分问题是:
甚至可以为大文件执行此操作吗?如果是这样的话?
如果可以直接上传到S3,我该如何处理暂停/恢复?
PS.我正在使用PHP 5.2+
有没有办法使用PHP amazon SDK(或亚马逊的API命令行工具)获取EC2实例的公共DNS?
我尝试了这个PHP代码(以及其他),但它不起作用:
require_once '/full/path/sdk.class.php';
$ec2 = new AmazonEC2();
$response = $ec2->describe_regions();
print_r($response);
Run Code Online (Sandbox Code Playgroud)
并且
require_once '/full/path/sdk.class.php';
$ec2 = new AmazonEC2();
$response = $ec2->describe_instances(array(
'Filter' => array(
array('Name' => 'availability-zone', 'Value' => 'eu-west-1')
)
));
print_r($response);
Run Code Online (Sandbox Code Playgroud)
但我无法在回应中看到公众dns
amazon-ec2 ×3
php ×2
amazon-s3 ×1
automation ×1
file-upload ×1
linux ×1
multipart ×1
ssl ×1
upload ×1
windows ×1