차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판이전 판다음 판 | 이전 판 | ||
| tech:ssl_on_ubuntu [2016/07/12 00:56] – 바깥 편집 127.0.0.1 | tech:ssl_on_ubuntu [2018/01/31 01:52] (현재) – V_L | ||
|---|---|---|---|
| 줄 2: | 줄 2: | ||
| ======SSL on Ubuntu 8.10 Apache2====== | ======SSL on Ubuntu 8.10 Apache2====== | ||
| + | =====OpenSSL ROOT CA===== | ||
| - | Setting up SSL with Ubuntu 8.10 is a simple process but it does have a few gotchas that you need to be aware of. The setup has changed from 8.04. One issue is that the +CompatEnvVars is no longer used as it created a bug in 8.10 and you will have to enable the default-ssl site to get everything working. | + | 웹서비스에 https 를 적용할 경우 |
| - | + | 이럴때 OpenSSL 을 이용하여 인증기관을 만들고 Self signed certificate | |
| - | First, log on to your server | + | 발급된 |
| - | + | ||
| - | sudo apt-get install apache2 | + | https://www.lesstif.com/pages/viewpage.action? |
| - | + | ||
| - | Change to the / | + | 자체 인증서는 교류되는 정보를 암호화할 수는 있으나 |
| - | + | ||
| - | cd / | + | |
| - | ls | + | |
| - | cd / | + | |
| - | ls | + | |
| - | + | ||
| - | Now, install and enable SSL: | + | |
| - | + | ||
| - | sudo a2enmod ssl | + | |
| - | sudo / | + | |
| - | + | ||
| - | Change to the default webserver directory, and create a simple web page: | + | |
| - | cd /var/www | + | |
| - | sudo vim index.html | + | |
| - | + | ||
| - | Add the following content: | + | |
| - | < | + | |
| - | < | + | |
| - | < | + | |
| - | </ | + | |
| - | < | + | |
| - | < | + | |
| - | </ | + | |
| - | </ | + | |
| - | + | ||
| - | Save and exit. On your own local computer, open a tab or window for your web browser. | + | |
| - | + | ||
| - | http:// | + | |
| - | + | ||
| - | You should be able to view your web page. Now, you’ll want to encrypt your site. Create the server encryption keys: | + | |
| - | + | ||
| - | cd / | + | |
| - | sudo openssl genrsa -des3 -out server.key 1024 | + | |
| - | + | ||
| - | Use this set of keys to create a certificate request: | + | |
| - | + | ||
| - | sudo openssl req -new -key server.key -out server.csr | + | |
| - | + | ||
| - | When asked to input data, use your imagination to create something appropriate. | + | |
| - | + | ||
| - | sudo openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt | + | |
| - | + | ||
| - | Install the key and certificate: | + | |
| - | + | ||
| - | sudo cp server.crt / | + | |
| - | sudo cp server.key / | + | |
| - | + | ||
| - | Open the “defaults” file for editing: | + | |
| - | + | ||
| - | cd / | + | |
| - | sudo vim default-ssl | + | |
| - | + | ||
| - | This file is basically set up but you will want to uncomment | + | |
| - | + | ||
| - | SSLEngine on | + | |
| - | SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire | + | |
| - | SSLCertificateFile / | + | |
| - | SSLCertificateKeyFile / | + | |
| - | + | ||
| - | The port 443 is enabled when you use SSL so that is ready to go. | + | |
| - | + | ||
| - | Enable the default | + | |
| - | sudo a2ensite default-ssl | + | |
| - | + | ||
| - | If you do not enable the default-ssl you will get this error: | + | |
| - | “ssl_error_rx_record_too_long | + | |
| - | + | ||
| - | Restart Apache. | + | |
| - | + | ||
| - | sudo /etc/init.d/apache2 restart | + | |
| - | + | ||
| - | That should do it. | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | * 출처: [[http://beginlinux.com/ | + | |
| - | + | ||
| - | ^ 누구나 | + | |