apache2_ssl_debian
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| apache2_ssl_debian [2012/08/01 04:27] – memeruiz | apache2_ssl_debian [2021/02/01 05:55] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== apache2 + ssl + debian ====== | + | ====== apache2 + ssl + debian |
| * Install apache2 | * Install apache2 | ||
| Line 44: | Line 44: | ||
| # | # | ||
| #Listen 80 | #Listen 80 | ||
| + | |||
| + | * To have virtual hosts in ssl create a map file / | ||
| + | |||
| + | www.example.com | ||
| + | wiki.example.com | ||
| + | |||
| + | * To the file / | ||
| + | |||
| + | ### Mass SSL Vhosts ### | ||
| + | RewriteEngine on | ||
| + | | ||
| + | # | ||
| + | # the available virtual hosts with their corresponding | ||
| + | # | ||
| + | RewriteMap | ||
| + | RewriteMap | ||
| + | | ||
| + | # 1. make sure we don't map for common locations | ||
| + | RewriteCond | ||
| + | RewriteCond | ||
| + | | ||
| + | # 2. make sure we have a Host header | ||
| + | RewriteCond | ||
| + | | ||
| + | # 3. lowercase the hostname | ||
| + | RewriteCond | ||
| + | # | ||
| + | # 4. lookup this hostname in vhost.map and | ||
| + | # remember it only when it is a path | ||
| + | # (and not " | ||
| + | RewriteCond | ||
| + | | ||
| + | # 5. finally we can map the URL to its docroot location | ||
| + | # and remember the virtual host for logging puposes | ||
| + | RewriteRule | ||
| + | |||
| + | * We need the rewrite module: | ||
| + | |||
| + | sudo a2enmod rewrite | ||
| + | |||
| + | * Restart apache2 and voila! | ||
apache2_ssl_debian.1343795266.txt.gz · Last modified: 2021/02/01 05:55 (external edit)
