Add nginx config to serve static files. (#422)
* Add config to serve static files. * Remove non useful comments * More minor change
This commit is contained in:
19
README.md
19
README.md
@@ -211,6 +211,7 @@ password, plese follow the "Forgot Password" link on the "Sign In" page.
|
|||||||
|
|
||||||
To configure the mailman-web container to send emails, add this to your
|
To configure the mailman-web container to send emails, add this to your
|
||||||
`settings_local.py`.:
|
`settings_local.py`.:
|
||||||
|
|
||||||
```
|
```
|
||||||
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||||
EMAIL_HOST = '172.19.199.1'
|
EMAIL_HOST = '172.19.199.1'
|
||||||
@@ -284,9 +285,6 @@ server configuration.
|
|||||||
|
|
||||||
See [the nginx configuration][17] as an example.
|
See [the nginx configuration][17] as an example.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
This command will do several things, most importantly:
|
This command will do several things, most importantly:
|
||||||
|
|
||||||
- Run a wsgi server using [`uwsgi`][7] for the Mailman's Django-based web
|
- Run a wsgi server using [`uwsgi`][7] for the Mailman's Django-based web
|
||||||
@@ -480,10 +478,13 @@ that by adding the following to your configuration:
|
|||||||
|
|
||||||
```
|
```
|
||||||
# Nginx configuration.
|
# Nginx configuration.
|
||||||
|
location /static {
|
||||||
|
alias /opt/mailman/web/static;
|
||||||
|
autoindex off;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
# First attempt to serve request as file, then
|
|
||||||
|
|
||||||
proxy_pass http://172.19.199.3:8000;
|
proxy_pass http://172.19.199.3:8000;
|
||||||
include uwsgi_params;
|
include uwsgi_params;
|
||||||
uwsgi_read_timeout 300;
|
uwsgi_read_timeout 300;
|
||||||
@@ -512,10 +513,12 @@ To move to uwsgi protocol in the above nginx configuration use this
|
|||||||
|
|
||||||
```
|
```
|
||||||
# Nginx configuration.
|
# Nginx configuration.
|
||||||
|
location /static {
|
||||||
|
alias /opt/mailman/web/static;
|
||||||
|
autoindex off;
|
||||||
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
# First attempt to serve request as file, then
|
|
||||||
|
|
||||||
uwsgi_pass 172.19.199.3:8080;
|
uwsgi_pass 172.19.199.3:8080;
|
||||||
include uwsgi_params;
|
include uwsgi_params;
|
||||||
uwsgi_read_timeout 300;
|
uwsgi_read_timeout 300;
|
||||||
@@ -567,7 +570,7 @@ fi
|
|||||||
exit 0
|
exit 0
|
||||||
```
|
```
|
||||||
|
|
||||||
Please do not forget to make the script executable (chmod +x certbot-renew.sh).
|
**Please do not forget to make the script executable (`chmod +x certbot-renew.sh`).**
|
||||||
|
|
||||||
LICENSE
|
LICENSE
|
||||||
=======
|
=======
|
||||||
|
|||||||
Reference in New Issue
Block a user