computers:apache_server_configuration
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| computers:apache_server_configuration [2020/08/20 11:58] – [HTTPS/SSL] chkuo | computers:apache_server_configuration [2022/11/02 16:04] (current) – chkuo | ||
|---|---|---|---|
| Line 92: | Line 92: | ||
| </ | </ | ||
| + | |||
| + | ===== Update ===== | ||
| + | |||
| + | <code bash> | ||
| + | # for Ubuntu 20.04.5 LTS; 2022/11/02 | ||
| + | # to update beyond Apache/ | ||
| + | $ apache2 -v | ||
| + | Server version: Apache/ | ||
| + | Server built: | ||
| + | $ sudo add-apt-repository ppa: | ||
| + | $ sudo apt update | ||
| + | $ sudo apt install apache2 | ||
| + | $ apache2 -v | ||
| + | Server version: Apache/ | ||
| + | Server built: | ||
| + | $ systemctl status apache2 | ||
| + | $ sudo systemctl start apache2 | ||
| + | $ sudo systemctl enable apache2 | ||
| + | </ | ||
| ===== Password protection ===== | ===== Password protection ===== | ||
| Line 125: | Line 144: | ||
| # (2) get a certificate and have certbot edit the Apache configuration | # (2) get a certificate and have certbot edit the Apache configuration | ||
| $ sudo certbot --apache | $ sudo certbot --apache | ||
| - | </ | + | # |
| - | * modify ''/ | + | |
| - | < | + | |
| - | ServerName example.com | + | |
| - | ServerAdmin admin@example.com | + | |
| - | </ | + | |
| - | + | ||
| - | <code bash> | + | |
| # check status | # check status | ||
| $ sudo systemctl status certbot.timer | $ sudo systemctl status certbot.timer | ||
| Line 140: | Line 152: | ||
| # better to put '/ | # better to put '/ | ||
| $ sudo certbot renew | $ sudo certbot renew | ||
| + | # enable ssl | ||
| + | $ sudo a2enmod ssl | ||
| </ | </ | ||
| + | * modify ''/ | ||
| + | < | ||
| + | ServerName example.com | ||
| + | ServerAdmin admin@example.com | ||
| + | </ | ||
| + | |||
| + | |||
| * SSL test: [[https:// | * SSL test: [[https:// | ||
| ===== PHP ===== | ===== PHP ===== | ||
computers/apache_server_configuration.1597895918.txt.gz · Last modified: by chkuo