Revision aa62890f
b/docs/source/adminguide.rst | ||
---|---|---|
124 | 124 |
|
125 | 125 |
alias pithos-sync='cd /pithos && git pull && python setup.py build_sphinx && /etc/init.d/apache2 restart' |
126 | 126 |
|
127 |
Gunicorn Setup |
|
128 |
-------------- |
|
129 |
|
|
130 |
Add in ``/etc/apt/sources.list``:: |
|
131 |
|
|
132 |
deb http://backports.debian.org/debian-backports squeeze-backports main |
|
133 |
|
|
134 |
Then:: |
|
135 |
|
|
136 |
apt-get update |
|
137 |
apt-get -t squeeze-backports install gunicorn |
|
138 |
apt-get -t squeeze-backports install python-gevent |
|
139 |
|
|
140 |
Create ``/etc/gunicorn.d/pithos``:: |
|
141 |
|
|
142 |
CONFIG = { |
|
143 |
'mode': 'django', |
|
144 |
'working_dir': '/pithos/pithos', |
|
145 |
'user': 'www-data', |
|
146 |
'group': 'www-data', |
|
147 |
'args': ( |
|
148 |
'--bind=[::]:8080', |
|
149 |
'--worker-class=egg:gunicorn#gevent', |
|
150 |
'--workers=4', |
|
151 |
'--log-level=debug', |
|
152 |
'/pithos/pithos/settings.py', |
|
153 |
), |
|
154 |
} |
|
155 |
|
|
156 |
Replace the ``WSGI*`` directives in ``/etc/apache2/sites-available/pithos`` and ``/etc/apache2/sites-available/pithos-ssl`` with:: |
|
157 |
|
|
158 |
<Proxy *> |
|
159 |
Order allow,deny |
|
160 |
Allow from all |
|
161 |
</Proxy> |
|
162 |
|
|
163 |
SetEnv proxy-sendchunked |
|
164 |
SSLProxyEngine off |
|
165 |
ProxyErrorOverride off |
|
166 |
|
|
167 |
ProxyPass /api http://localhost:8080 retry=0 |
|
168 |
ProxyPassReverse /api http://localhost:8080 |
|
169 |
|
|
170 |
Configure and run:: |
|
171 |
|
|
172 |
/etc/init.d/gunicorn restart |
|
173 |
a2enmod proxy |
|
174 |
a2enmod proxy_http |
|
175 |
/etc/init.d/apache2 restart |
|
176 |
|
|
127 | 177 |
Shibboleth Setup |
128 | 178 |
---------------- |
129 | 179 |
|
... | ... | |
135 | 185 |
|
136 | 186 |
Add in ``/etc/apache2/sites-available/pithos-ssl``:: |
137 | 187 |
|
138 |
ShibConfig /etc/shibboleth/shibboleth2.xml
|
|
139 |
Alias /shibboleth-sp /usr/share/shibboleth
|
|
188 |
ShibConfig /etc/shibboleth/shibboleth2.xml
|
|
189 |
Alias /shibboleth-sp /usr/share/shibboleth
|
|
140 | 190 |
|
141 |
<Location /api/login>
|
|
142 |
AuthType shibboleth
|
|
143 |
ShibRequireSession On
|
|
144 |
ShibUseHeaders On
|
|
145 |
require valid-user
|
|
146 |
</Location>
|
|
191 |
<Location /api/login>
|
|
192 |
AuthType shibboleth
|
|
193 |
ShibRequireSession On
|
|
194 |
ShibUseHeaders On
|
|
195 |
require valid-user
|
|
196 |
</Location>
|
|
147 | 197 |
|
148 | 198 |
Configure and run apache:: |
149 | 199 |
|
Also available in: Unified diff