* nginx needs to add X-Forwarded-For and REMOTE_ADDR headers to get the IP address properly * uwsgi now logs 400 errors and adds the REMOTE_ADDR to the log file Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
20 lines
388 B
Nginx Configuration File
20 lines
388 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name _;
|
|
|
|
location /static {
|
|
root /usr/share/nginx/html;
|
|
}
|
|
|
|
location /media {
|
|
root /usr/share/nginx/html;
|
|
}
|
|
|
|
location / {
|
|
include uwsgi_params;
|
|
uwsgi_pass app:3031;
|
|
uwsgi_param HTTP_X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
uwsgi_param REMOTE_ADDR $proxy_add_x_forwarded_for;
|
|
}
|
|
}
|