AWSメモ >

EC2にApacheをインストール

apacheインストール

sudo yum -y install httpd sudo service httpd start

ssl/tls設定

https://docs.aws.amazon.com/ja_jp/AWSEC2/latest/UserGuide/SSL-on-an-instance.html

sudo systemctl start httpd sudo systemctl enable httpd

Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.

sudo yum update -y sudo yum install -y mod_ssl

sudo sh -c "openssl genrsa 2048 > /etc/httpd/conf/aws.magata.net-server.key" sudo sh -c "openssl req -new -key /etc/httpd/conf/aws.magata.net-server.key > /etc/httpd/conf/aws.magata.net-server.csr" openssl x509 -req -signkey /etc/httpd/conf/aws.magata.net-server.key < /etc/httpd/conf/aws.magata.net-server.csr > aws.magata.net-server.crt sudo mv aws.magata.net-server.crt /etc/httpd/conf/

sudo vim /etc/httpd/conf.d/ssl.conf


SSLCertificateFile /etc/httpd/conf/aws.magata.net-server.crt SSLCertificateKeyFile /etc/httpd/conf/aws.magata.net-server.key


sudo service httpd restart


トップ   一覧 単語検索 最終更新   ヘルプ   最終更新のRSS