Browse Source

Merge pull request #284 from noelmcloughlin/docs

docs(example): document redirect 80->443 fix #226
tags/v1.0.1
N 4 years ago
parent
commit
3830ba436f
No account linked to committer's email address
2 changed files with 31 additions and 2 deletions
  1. +16
    -1
      docs/README.rst
  2. +15
    -1
      pillar.example

+ 16
- 1
docs/README.rst View File

:scale: 100% :scale: 100%
:target: https://github.com/semantic-release/semantic-release :target: https://github.com/semantic-release/semantic-release


Formulas to set up and configure the Apache HTTP server.
Formulas to set up and configure the Apache HTTP server on GNU/Linux, FreeBSD, and Windows OS.


.. contents:: **Table of Contents** .. contents:: **Table of Contents**


path: 'salt://path/to/sites-available/conf/file' path: 'salt://path/to/sites-available/conf/file'
state: 'enabled' state: 'enabled'


sites:
# Force SSL: Redirect from 80 to 443
example.com:
port: 80
template_file: salt://apache/vhosts/redirect.tmpl
RedirectSource: 'permanent /'
# Trailing slash is important
RedirectTarget: 'https://example.com/'
example.com_ssl:
port: 443
ServerName: example.com
SSLCertificateFile: /path/to/ssl.crt
SSLCertificateKeyFile: /path/to/ssl.key
SSLCertificateChainFile: /path/to/ssl.ca.crt

Testing Testing
------- -------



+ 15
- 1
pillar.example View File

# Additional config as a # Additional config as a
# multi-line string here # multi-line string here


# Force SSL: Redirect from 80 to 443
example2.com:
port: 80
template_file: salt://apache/vhosts/redirect.tmpl
RedirectSource: 'permanent /'
# Trailing slash is important
RedirectTarget: 'https://example.com/'
example2.com_ssl:
port: 443
ServerName: example.com
SSLCertificateFile: /path/to/ssl.crt
SSLCertificateKeyFile: /path/to/ssl.key
SSLCertificateChainFile: /path/to/ssl.ca.crt

# Use RedirectMatch Directive
redirectmatch.com: redirectmatch.com:
# Use RedirectMatch Directive
# - https://httpd.apache.org/docs/2.4/fr/mod/mod_alias.html#redirectmatch # - https://httpd.apache.org/docs/2.4/fr/mod/mod_alias.html#redirectmatch
# Require module mod_alias # Require module mod_alias
enabled: true enabled: true

Loading…
Cancel
Save