Statistics
| Branch: | Tag: | Revision:

root / docs / scale / i-apache.rst @ 84809111

History | View | Annotate | Download (1.9 kB)

1
.. _i-apache:
2

    
3
Synnefo
4
-------
5

    
6
:ref:`synnefo <i-synnefo>` ||
7
:ref:`ns <i-ns>` ||
8
:ref:`apt <i-apt>` ||
9
:ref:`mq <i-mq>` ||
10
:ref:`db <i-db>` ||
11
:ref:`gunicorn <i-gunicorn>` ||
12
apache ||
13
:ref:`webproject <i-webproject>` ||
14
:ref:`astakos <i-astakos>` ||
15
:ref:`qh <i-qh>` ||
16
:ref:`cms <i-cms>` ||
17
:ref:`pithos <i-pithos>` ||
18
:ref:`cyclades <i-cyclades>` ||
19
:ref:`kamaki <i-kamaki>` ||
20
:ref:`backends <i-backends>`
21

    
22
Apache Setup
23
++++++++++++
24

    
25
The following apply to ``astakos``, ``pithos``, ``cyclades`` and ``cms`` nodes.
26
Here we assume that these nodes have FQDM ``nodeX.example.com``.
27

    
28
First install corresponding packet:
29

    
30
.. code-block:: console
31

    
32
   # apt-get install apache2
33

    
34
In `/etc/apache2/sites-available/synnefo` add:
35

    
36
.. code-block:: console
37

    
38
   <VirtualHost *:80>
39
     ServerName nodeX.example.com
40

    
41
     RewriteEngine On
42
     RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
43
   </VirtualHost>
44

    
45
In `/etc/apache2/sites-available/synnefo-ssl` add:
46

    
47
.. code-block:: console
48

    
49
   <IfModule mod_ssl.c>
50
   <VirtualHost _default_:443>
51
     ServerName nodeX.example.com
52

    
53
     Alias /static "/usr/share/synnefo/static"
54

    
55
     AllowEncodedSlashes On
56

    
57
     RequestHeader set X-Forwarded-Protocol "https"
58

    
59
     <Proxy * >
60
       Order allow,deny
61
       Allow from all
62
     </Proxy>
63

    
64
     SetEnv                proxy-sendchunked
65
     SSLProxyEngine        off
66
     ProxyErrorOverride    off
67

    
68
     ProxyPass        /static !
69
     ProxyPass        / http://localhost:8080/ retry=0
70
     ProxyPassReverse / http://localhost:8080/
71

    
72
     SSLEngine on
73
     SSLCertificateFile    /etc/ssl/certs/ssl-cert-snakeoil.pem
74
     SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
75
   </VirtualHost>
76
   </IfModule>
77

    
78
Now enable sites and modules by running:
79

    
80
.. code-block:: console
81

    
82
   # a2enmod ssl
83
   # a2enmod rewrite
84
   # a2dissite default
85
   # a2ensite synnefo
86
   # a2ensite synnefo-ssl
87
   # a2enmod headers
88
   # a2enmod proxy_http
89

    
90

    
91
Test your Setup:
92
++++++++++++++++