To get the real IP addresses of the requests, the nginx.conf file at /etc/nginx/nginx.conf is modified to have two additional lines:
# /etc/nginx/nginx.conf
...
real_ip_header X-Forwarded-For;
set_real_ip_from 10.0.0.0/8;
...
# /etc/nginx/nginx.conf
...
real_ip_header X-Forwarded-For;
set_real_ip_from 10.0.0.0/8;
...
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/usr/local/bin/uwsgi --ini /home/user/app/uwsgi.ini
exit 0
server {
#listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
root /usr/share/nginx/www;
index index.html index.htm;
...
# kill -HUP `cat /var/run/nginx.pid`
/HUP
...
name. There is no default. Typing kill does not send a sig-
nal to the current job. If the signal being sent is TERM
(terminate) or HUP (hangup), then the job or process is sent
a CONT (continue) signal as well.
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libgd2-noxpm libjpeg-turbo8 libjpeg8 libxslt1.1 nginx-common nginx-full
Suggested packages:
libgd-tools
The following NEW packages will be installed:
libgd2-noxpm libjpeg-turbo8 libjpeg8 libxslt1.1 nginx nginx-common nginx-full
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 403 kB/882 kB of archives.
After this operation, 2,691 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Err http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/universe nginx-common all 1.1.19-1ubuntu0.1
403 Forbidden
Err http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/universe nginx-full amd64 1.1.19-1ubuntu0.1
403 Forbidden
Err http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/universe nginx all 1.1.19-1ubuntu0.1
403 Forbidden
Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/pool/universe/n/nginx/nginx-common_1.1.19-1ubuntu0.1_all.deb 403 Forbidden
Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/pool/universe/n/nginx/nginx-full_1.1.19-1ubuntu0.1_amd64.deb 403 Forbidden
Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/pool/universe/n/nginx/nginx_1.1.19-1ubuntu0.1_all.deb 403 Forbidden
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
sudo apt-get update