I have used nginx + fcgi for php (before moving to php5-fmp, which is more robust), however, I really lack technical talent to implement the same for web2py, given the nginx.conf that you kindly shared. So I would be grateful if you write up a complete guide, when you have time.
Cheers I would love to see the complete On Mar 10, 12:23 pm, Michele Alzetta <michele.alze...@gmail.com> wrote: > On Thu, Mar 10, 2011 at 12:09 AM, minux <esip...@gmail.com> 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_passhttp://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! :)