我有一个使用 https 向客户端传输 javascript 文件的网站。该网站是getsimpleapps.com。
事实证明,使用 https (20.08s - 29.08s) 加载此文件的速度比使用 http (380ms) 慢 52 倍。
该站点的主页与 javacript 文件具有相同的缓慢性。
我最近从 Dreamhost 切换到了 linode,并试图让 SSL 在新服务器上工作,直到它成功为止。我没有做任何疯狂的配置。
linode 正在运行 Ubuntu 12.04,并且该站点位于 (LAMP) 堆栈之上。
我对堆栈溢出社区的问题是:如何在我的服务器上修复 SSL 和 HTTPS?我知道堆栈溢出充斥着关于HTTPS 缓慢的问题,但没有给出真正的解决方案。一个 ubuntu 教程或配置指南将是理想的。
文件:/etc/apache2/sites-enabled/getsimpleapps.com
<VirtualHost *:80>
ServerAdmin admin@getsimpleapps.com
ServerName getsimpleapps.com
ServerAlias www.getsimpleapps.com
DocumentRoot /srv/sites/getsimpleapps.com/public/
ErrorLog /srv/sites/getsimpleapps.com/logs/error.log
CustomLog /srv/sites/getsimpleapps.com/logs/access.log combined
</VirtualHost>
<VirtualHost 50.116.58.18:443>
SSLEngine On
#SSLCertificateFile /etc/apache2/ssl/www.getsimpleapps.com.crt
#SSLCertificateKeyFile /etc/apache2/ssl/www.getsimpleapps.com.key
#SSLCACertificateFile /etc/apache2/ssl/comodo.crt
SSLCertificateFile /etc/apache2/ssl/dreamhost/dh.crt
SSLCertificateKeyFile /etc/apache2/ssl/dreamhost/dh.key
SSLCACertificateFile /etc/apache2/ssl/dreamhost/dh.cer
ServerAdmin admin@getsimpleapps.com
ServerName …
Run Code Online (Sandbox Code Playgroud) 如果您使用 ElasticBeanstalk 设置 RDS,您如何进入框(通过 eb ssh
)并查看将 RDS 应用于您的 EB 实例时设置的环境变量?
Amazon 会自动设置这些环境变量。
RDS_DB_NAME
RDS_USERNAME
RDS_PASSWORD
RDS_HOSTNAME
RDS_PORT
似乎只能在运行应用程序的进程中查看。
我想以某种方式通过终端查看这些,eb printenv
命令不显示它们。
似乎负载均衡器 url 和弹性 beanstalk 都指向相同的 ip 地址。
thomasreggi$ nslookup aws-load-balancer-url.us-east-1.elb.amazonaws.com
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
Name: aws-load-balancer-url.us-east-1.elb.amazonaws.com
Address: 100.00.000.0
Name: aws-load-balancer-url.us-east-1.elb.amazonaws.com
Address: 100.000.000.000
thomasreggi$ nslookup elastic-beanstalk-url.us-east-1.elasticbeanstalk.com
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
Name: elastic-beanstalk-url.us-east-1.elasticbeanstalk.com
Address: 100.00.000.0
Name: elastic-beanstalk-url.us-east-1.elasticbeanstalk.com
Address: 100.000.000.000
Run Code Online (Sandbox Code Playgroud)
我想知道使用一个 url 是否有任何特定优势。
我很好奇人们如何db migrate
在他们的 eb 应用程序上运行命令。如果您将其添加为一个.ebextensions
我担心当您为一个应用程序有多个实例时,如果多个服务器尝试运行相同的迁移,则可能会发生冲突。
应该在部署过程中的什么时候db migrate
运行命令?
我以非 root 用户帐户登录(ssh)我的 ubuntu 服务器。我不能以 root 身份直接 ssh 进入服务器,因为我禁用了它。我有root密码。我需要在这个用户中更改我当前登录的用户密码,但没有密码。
我忘记了命令,但有一种方法可以在此帐户中充当脚,从那里我可以更改此密码吗?
我有点迷茫,所以任何帮助都可以提供帮助。
我在亚马逊的 linux 上运行亚马逊 ec2 实例。
每当我运行任何东西时,sudo yum
它都会给我这个:
sudo: yum: command not found
ec2-user$ rpm -qf /usr/bin/yum
yum-3.2.29-30.24.amzn1.noarch
ec2-user$ which yum
/usr/bin/yum
Run Code Online (Sandbox Code Playgroud)
which yum
而在 root 中给出:
root$ which yum
/usr/bin/which: no yum in (/sbin:/bin:/usr/sbin:/usr/bn:/usr/local/bin:/opt/aws/bin)
Run Code Online (Sandbox Code Playgroud)
这是两天前的新 ec2 实例。当我第一次登录时,我跑了sudo yum update
,但一切都不太顺利。发生了什么变化?
我有一个 ubuntu 服务器。我index.html
使用touch
. 并尝试使用nano
,结果发现权限被拒绝。为什么是这样?如果我只是在服务器上创建文件,为什么我首先没有写访问权限?我的第二个问题是,如果我想更改数字格式的权限644
(服务器上的 html 文件应该设置为什么?)我如何查看当前是什么我如何转换-rw-rw-r--
为数字格式?我想-ls -l
用数字权限格式而不是-rw-rw-r--
. 该index.html
文件在服务器上运行正常。
thomas@vannevar:~/public/example.org/public$ touch index.html
thomas@vannevar:~/public/example.org/public$ ls
index.html
thomas@vannevar:~/public/example.org/public$ nano index.html
Error reading /home/thomas/.nano_history: Permission denied
Press Enter to continue starting nano.
thomas@vannevar:~/public/example.org/public$ ls -l
total 0
-rw-rw-r-- 1 thomas thomas 0 May 17 13:57 index.html
thomas@vannevar:~/public/example.org/public$
Run Code Online (Sandbox Code Playgroud)
这有效
ubuntu ×3
root ×2
amazon-ebs ×1
amazon-ec2 ×1
amazon-rds ×1
apache-2.2 ×1
database ×1
https ×1
linode ×1
migration ×1
password ×1
permissions ×1
ssl ×1
sudo ×1
yum ×1