162 | | == Configure SSL on Apache2 with Letsencrypt == |
163 | | If you do this installation in Lab setup please skip to implementing https with self-signed certificates as described in '''step 13'''. |
164 | | |
165 | | 10. Disable default apache configuration: |
166 | | * |
167 | | {{{ |
168 | | a2dissite 000-default |
169 | | }}} |
170 | | |
171 | | 11. Create a new configuration file as `idp.conf` with the following: |
172 | | * |
173 | | {{{ |
174 | | vim /etc/apache2/site-available/idp.conf |
175 | | }}} |
176 | | {{{ |
177 | | <VirtualHost *:80> |
178 | | ServerName idp.instXY.ac.lk |
179 | | ServerAdmin admin@instXY.ac.lk |
180 | | DocumentRoot /var/www/html |
181 | | </VirtualHost> |
182 | | }}} |
183 | | Enable Apache2 modules: |
184 | | * |
185 | | {{{ |
186 | | a2enmod proxy_http ssl headers alias include negotiation |
187 | | }}} |
188 | | Restart the Apache service: |
189 | | * |
190 | | {{{ |
191 | | service apache2 restart |
192 | | }}} |
193 | | |
194 | | |
195 | | 12. Create a Certificate and a Key self-signed for HTTPS and enable secure web server. '''(Skip this step if you are installing IDP on production environment)''' |
| 162 | |
| 163 | 10. Create a Certificate and a Key self-signed for HTTPS and enable secure web server. '''(Skip step 10 if you are installing IDP on a production environment)''' |
281 | | 13. ('''Do this only on your production servers''') Skip '''step 12''' and Install Letsencrypt and enable HTTPS: |
| 249 | == Configure SSL on Apache2 with Letsencrypt (for Production Servers)== |
| 250 | For tutorial purposes, implementing https was done with self-signed certificates. Therefore, please skip to '''step 14'''. |
| 251 | |
| 252 | 11. Disable default apache configuration: |
| 253 | * |
| 254 | {{{ |
| 255 | a2dissite 000-default |
| 256 | }}} |
| 257 | |
| 258 | 12. Create a new configuration file as `idp.conf` with the following: |
| 259 | * |
| 260 | {{{ |
| 261 | vim /etc/apache2/site-available/idp.conf |
| 262 | }}} |
| 263 | {{{ |
| 264 | <VirtualHost *:80> |
| 265 | ServerName idp.instXY.ac.lk |
| 266 | ServerAdmin admin@instXY.ac.lk |
| 267 | DocumentRoot /var/www/html |
| 268 | </VirtualHost> |
| 269 | }}} |
| 270 | Enable Apache2 modules: |
| 271 | * |
| 272 | {{{ |
| 273 | a2enmod proxy_http ssl headers alias include negotiation |
| 274 | }}} |
| 275 | Restart the Apache service: |
| 276 | * |
| 277 | {{{ |
| 278 | service apache2 restart |
| 279 | }}} |
| 280 | |
| 281 | |
| 282 | 13. Install Letsencrypt and enable HTTPS: |