On Thu, Mar 10, 2011 at 12:09 AM, minux <[email protected]> wrote:
>
> Cutting the long story short, I really appreciate it if someone could
> point me to a complete guide for nginx deployment, or writhe one :)
>
I have web2py on a linode.com VPS deployed on nginx with ssl access so I can
have access to administrative interface.
As linux distro I use gentoo. Nginx and spawn-fcgi I emerge, whereas web2py
I just download and install by hand.
nginx.conf contains:
server {
listen 443;
ssl on;
ssl_certificate /etc/ssl/nginx/nginx.pem;
ssl_certificate_key /etc/ssl/nginx/nginx.key;
keepalive_timeout 70;
server_name my.server.name;
access_log /var/log/nginx/web2py.access.log;
location / {
set $fixed_destination $http_destination;
if ($http_destination ~* ^https(.*)$)
{
set $fixed_destination http$1;
}
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Destination $fixed_destination;
}
Is this enough for you? If people really feel it is useful I could write a
guide for nginx deployment, but give me some time! :)