server:nginx
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
server:nginx [2022/07/18 17:26] – [操作ログ] nipa28 | server:nginx [2022/07/18 18:54] (現在) – [操作ログ] nipa28 | ||
---|---|---|---|
行 5: | 行 5: | ||
--- | --- | ||
- | https:// | + | [Ubuntu 20.04にNginxをインストールする方法](https:// |
+ | [【Ubuntu】Let’s Encrypt+nginxでSSL/ | ||
環境 | 環境 | ||
行 12: | 行 13: | ||
VPS, WebARENA indigo, Ubuntu20.04, | VPS, WebARENA indigo, Ubuntu20.04, | ||
+ | DDNS Nowで取得したドメインで接続 xxx.f5.si, ooo.f5.si | ||
操作ログ | 操作ログ | ||
------ | ------ | ||
+ | |||
``` | ``` | ||
行 26: | 行 28: | ||
``` | ``` | ||
+ | http(暗号化なし)ではつながる。 | ||
{{: | {{: | ||
+ | |||
+ | サーバーブロックの設定 | ||
+ | |||
+ | ``` | ||
+ | ubuntu@i-12100000390816: | ||
+ | ubuntu@i-12100000390816: | ||
+ | ubuntu@i-12100000390816: | ||
+ | ubuntu@i-12100000390816: | ||
+ | ubuntu@i-12100000390816: | ||
+ | ubuntu@i-12100000390816: | ||
+ | ``` | ||
+ | |||
+ | ``` | ||
+ | ubuntu@i-12100000390816: | ||
+ | server { | ||
+ | listen 80; | ||
+ | listen [::]:80; | ||
+ | |||
+ | root / | ||
+ | index index.html index.htm index.nginx-debian.html; | ||
+ | |||
+ | server_name xxx.f5.si www.xxx.f5.si; | ||
+ | |||
+ | location / { | ||
+ | try_files $uri $uri/ =404; | ||
+ | } | ||
+ | } | ||
+ | ubuntu@i-12100000390816: | ||
+ | |||
+ | ``` | ||
+ | |||
+ | ``` | ||
+ | ubuntu@i-12100000390816: | ||
+ | ``` | ||
+ | xxx.f5.si 効果確認用テストページが表示された | ||
+ | {{: | ||
+ | ooo.f5.si (xxx.f5.siと同じIP) デフォルトのページが表示された | ||
+ | {{: | ||
+ | |||
+ | --- | ||
+ | |||
+ | SSL証明書 | ||
+ | |||
+ | xxx.f5.siのSSL証明書を取って、HTTPS接続可能にする。 | ||
+ | |||
+ | ``` | ||
+ | ubuntu@i-12100000390816: | ||
+ | ubuntu@i-12100000390816: | ||
+ | Saving debug log to / | ||
+ | Plugins selected: Authenticator nginx, Installer nginx | ||
+ | |||
+ | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
+ | Would you be willing to share your email address with the Electronic Frontier | ||
+ | Foundation, a founding partner of the Let's Encrypt project and the non-profit | ||
+ | organization that develops Certbot? We'd like to send you email about our work | ||
+ | encrypting the web, EFF news, campaigns, and ways to support digital freedom. | ||
+ | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
+ | (Y)es/(N)o: n | ||
+ | Obtaining a new certificate | ||
+ | Performing the following challenges: | ||
+ | http-01 challenge for xxx.f5.si | ||
+ | Waiting for verification... | ||
+ | Cleaning up challenges | ||
+ | Deploying Certificate to VirtualHost / | ||
+ | |||
+ | Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access. | ||
+ | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
+ | 1: No redirect - Make no further changes to the webserver configuration. | ||
+ | 2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for | ||
+ | new sites, or if you're confident your site works on HTTPS. You can undo this | ||
+ | change by editing your web server' | ||
+ | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
+ | Select the appropriate number [1-2] then [enter] (press ' | ||
+ | Redirecting all traffic on port 80 to ssl in / | ||
+ | |||
+ | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
+ | Congratulations! You have successfully enabled https:// | ||
+ | |||
+ | You should test your configuration at: | ||
+ | https:// | ||
+ | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
+ | |||
+ | IMPORTANT NOTES: | ||
+ | - Congratulations! Your certificate and chain have been saved at: | ||
+ | / | ||
+ | Your key file has been saved at: | ||
+ | / | ||
+ | Your cert will expire on 2022-10-16. To obtain a new or tweaked | ||
+ | | ||
+ | with the " | ||
+ | your certificates, | ||
+ | - Your account credentials have been saved in your Certbot | ||
+ | | ||
+ | | ||
+ | also contain certificates and private keys obtained by Certbot so | ||
+ | | ||
+ | - If you like Certbot, please consider supporting our work by: | ||
+ | |||
+ | | ||
+ | | ||
+ | |||
+ | ubuntu@i-12100000390816: | ||
+ | |||
+ | ``` | ||
+ | |||
+ | できた。 | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ■ | ||
+ |
server/nginx.1658132790.txt.gz · 最終更新: 2022/07/18 17:26 by nipa28