| 266 | ==== Configure your "VIrtural Host" ==== |
| 267 | While you have verified your certificate, you will discover that you have no access to your server - ''"You don't have permission to access.... on this server."''\\ |
| 268 | This is because the SSL Virtual Host has not been configured in ''"/opt/local/apache2/conf/extra/httpd-ssl.conf"'' |
| 269 | |
| 270 | Edit ''"/opt/local/apache2/conf/conf/extra/httpd-ssl.conf"'' and moved down to the section: |
| 271 | {{{ |
| 272 | # General setup for the virtual host |
| 273 | DocumentRoot "/opt/local/apache2/htdocs" |
| 274 | ServerName www.example.com:443 |
| 275 | ServerAdmin you@example.com |
| 276 | ErrorLog "/opt/local/apache2/logs/error_log" |
| 277 | TransferLog "/opt/local/apache2/logs/access_log" |
| 278 | }}} |
| 279 | Configure this section appropriately. \\ |
| 280 | Assuming you wish to implement SSL on your entire server, ''DocumentRoot'' and ''ServerName'' should match the values in ''"/opt/local/apache2/conf/httpd.conf"''\\ |
| 281 | As there are many optional ways of configuring security on your web server, consult the Apache2 manual for details. |
| 282 | {{{ |
| 283 | http://httpd.apache.org/docs/2.2/ssl/ |
| 284 | }}} |
| 285 | |
| 286 | After each change to the config file, you should again verify the file syntax, and then you need to stop and restart Apache for the changes to take effect. |
| 287 | {{{ |
| 288 | $ /opt/local/apache2/bin/apachectl -t |
| 289 | $ sudo port unload apache2 |
| 290 | $ sudo port load apache2 |
| 291 | }}} |