This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| linux:ubuntu:apache2 [2018/01/08 11:50] – created lunetikk | linux:ubuntu:apache2 [2020/01/13 21:25] (current) – lunetikk | ||
|---|---|---|---|
| Line 19: | Line 19: | ||
| < | < | ||
| apt-get install libapache2-mod-python | apt-get install libapache2-mod-python | ||
| + | </ | ||
| + | |||
| + | PHP5 | ||
| + | < | ||
| + | apt-get install php5 libapache2-mod-php5 php-pear php5-xcache | ||
| </ | </ | ||
| PHP | PHP | ||
| < | < | ||
| - | apt-get install libapache2-mod-php5 php5 php-pear php5-xcache | + | apt-get install |
| </ | </ | ||
| Line 61: | Line 66: | ||
| </ | </ | ||
| + | ==== vHosts ==== | ||
| - | < | + | For SSL, add the follow to your vHost config |
| - | ==== vHosts ==== | + | Redirect to %%https:// |
| + | < | ||
| + | RewriteEngine | ||
| + | RewriteCond | ||
| + | RewriteRule | ||
| + | </ | ||
| + | Add virtualhost: | ||
| + | < | ||
| + | SSLEngine On | ||
| + | SSLCertificateFile / | ||
| + | SSLCertificateKeyFile / | ||
| + | SSLCertificateChainFile / | ||
| + | # | ||
| + | SSLProtocol All -SSLv2 -SSLv3 -TLSv1 | ||
| + | |||
| + | < | ||
| + | SSLRequireSSL On | ||
| + | SSLVerifyClient optional | ||
| + | SSLVerifyDepth 1 | ||
| + | SSLOptions +StdEnvVars +StrictRequire | ||
| + | </ | ||
| + | </ | ||
| Enable Site | Enable Site | ||
| Line 73: | Line 100: | ||
| Disable Site | Disable Site | ||
| < | < | ||
| + | |||
| + | === vHost example === | ||
| + | |||
| + | < | ||
| + | < | ||
| + | # The ServerName directive sets the request scheme, hostname and port that | ||
| + | # the server uses to identify itself. This is used when creating | ||
| + | # redirection URLs. In the context of virtual hosts, the ServerName | ||
| + | # specifies what hostname must appear in the request' | ||
| + | # match this virtual host. For the default virtual host (this file) this | ||
| + | # value is not decisive as it is used as a last resort host regardless. | ||
| + | # However, you must set it for any further virtual host explicitly. | ||
| + | #ServerName www.example.com | ||
| + | |||
| + | ServerAdmin [email protected] | ||
| + | ServerName lunetikk.de | ||
| + | ServerAlias www.lunetikk.de lunetikk.de | ||
| + | ServerPath / | ||
| + | |||
| + | DocumentRoot / | ||
| + | |||
| + | # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, | ||
| + | # error, crit, alert, emerg. | ||
| + | # It is also possible to configure the loglevel for particular | ||
| + | # modules, e.g. | ||
| + | #LogLevel info ssl:warn | ||
| + | |||
| + | ErrorLog ${APACHE_LOG_DIR}/ | ||
| + | CustomLog ${APACHE_LOG_DIR}/ | ||
| + | |||
| + | # For most configuration files from conf-available/, | ||
| + | # enabled or disabled at a global level, it is possible to | ||
| + | # include a line for only one particular virtual host. For example the | ||
| + | # following line enables the CGI configuration for this host only | ||
| + | # after it has been globally disabled with " | ||
| + | #Include conf-available/ | ||
| + | |||
| + | RewriteEngine | ||
| + | RewriteCond | ||
| + | RewriteRule | ||
| + | |||
| + | |||
| + | < | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | Options FollowSymLinks | ||
| + | AllowOverride none | ||
| + | Require all granted | ||
| + | DirectoryIndex index.html | ||
| + | </ | ||
| + | |||
| + | </ | ||
| + | |||
| + | < | ||
| + | ServerAdmin [email protected] | ||
| + | ServerName lunetikk.de | ||
| + | ServerAlias www.lunetikk.de lunetikk.de | ||
| + | |||
| + | ServerPath / | ||
| + | DocumentRoot / | ||
| + | |||
| + | ErrorLog ${APACHE_LOG_DIR}/ | ||
| + | CustomLog ${APACHE_LOG_DIR}/ | ||
| + | |||
| + | |||
| + | < | ||
| + | Options FollowSymLinks Indexes Includes ExecCGI | ||
| + | AllowOverride none | ||
| + | Require all granted | ||
| + | DirectoryIndex index.html | ||
| + | </ | ||
| + | |||
| + | SSLEngine On | ||
| + | SSLCertificateFile / | ||
| + | SSLCertificateKeyFile / | ||
| + | SSLCertificateChainFile / | ||
| + | |||
| + | # | ||
| + | SSLProtocol All -SSLv2 -SSLv3 -TLSv1 | ||
| + | |||
| + | < | ||
| + | SSLRequireSSL On | ||
| + | SSLVerifyClient optional | ||
| + | SSLVerifyDepth 1 | ||
| + | SSLOptions +StdEnvVars +StrictRequire | ||
| + | </ | ||
| + | |||
| + | </ | ||
| + | </ | ||