root / docs / scale / i-apache.rst @ e3ff6830
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:`cms <i-cms>` || |
16 |
:ref:`pithos <i-pithos>` || |
17 |
:ref:`cyclades <i-cyclades>` || |
18 |
:ref:`kamaki <i-kamaki>` || |
19 |
:ref:`backends <i-backends>` |
20 |
|
21 |
Apache Setup |
22 |
++++++++++++ |
23 |
|
24 |
The following apply to ``astakos``, ``pithos``, ``cyclades`` and ``cms`` nodes. |
25 |
Here we assume that these nodes have FQDM ``nodeX.example.com``. |
26 |
|
27 |
First install corresponding packet: |
28 |
|
29 |
.. code-block:: console |
30 |
|
31 |
# apt-get install apache2 |
32 |
|
33 |
In `/etc/apache2/sites-available/synnefo` add: |
34 |
|
35 |
.. code-block:: console |
36 |
|
37 |
<VirtualHost *:80> |
38 |
ServerName nodeX.example.com |
39 |
|
40 |
RewriteEngine On |
41 |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} |
42 |
</VirtualHost> |
43 |
|
44 |
In `/etc/apache2/sites-available/synnefo-ssl` add: |
45 |
|
46 |
.. code-block:: console |
47 |
|
48 |
<IfModule mod_ssl.c> |
49 |
<VirtualHost _default_:443> |
50 |
ServerName nodeX.example.com |
51 |
|
52 |
Alias /static "/usr/share/synnefo/static" |
53 |
|
54 |
AllowEncodedSlashes On |
55 |
|
56 |
RequestHeader set X-Forwarded-Protocol "https" |
57 |
|
58 |
<Proxy * > |
59 |
Order allow,deny |
60 |
Allow from all |
61 |
</Proxy> |
62 |
|
63 |
SetEnv proxy-sendchunked |
64 |
SSLProxyEngine off |
65 |
ProxyErrorOverride off |
66 |
|
67 |
ProxyPass /static ! |
68 |
ProxyPass / http://localhost:8080/ retry=0 |
69 |
ProxyPassReverse / http://localhost:8080/ |
70 |
|
71 |
SSLEngine on |
72 |
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem |
73 |
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key |
74 |
</VirtualHost> |
75 |
</IfModule> |
76 |
|
77 |
Now enable sites and modules by running: |
78 |
|
79 |
.. code-block:: console |
80 |
|
81 |
# a2enmod ssl |
82 |
# a2enmod rewrite |
83 |
# a2dissite default |
84 |
# a2ensite synnefo |
85 |
# a2ensite synnefo-ssl |
86 |
# a2enmod headers |
87 |
# a2enmod proxy_http |
88 |
|
89 |
|
90 |
Test your Setup: |
91 |
++++++++++++++++ |