location ~* /(\w+)/static/ { root /home/www-data/web2py/applications/;
should be: location ~* /(\w+)/static/ { root /var/www/web2py/applications/; Also, you'll need to repeat that configuration in the SSL section if you want nginx to serve static files via HTTPS as well. Anthony On Sunday, October 4, 2015 at 6:24:03 AM UTC-4, Encompass solutions wrote: > > I have setup uwsgi and I seem to be very close to having everything > working. > It just seems that my static data is not loaded now. (css, images, so > forth) > This is my nginx file with the web2py applicaiton in it. > Any ideas into the issue? My web2py installation is located in > /var/www/web2py/. > # file /etc/nginx/sites-available/web2py > server { > listen 80; > server_name $hostname; > #to enable correct use of response.static_version > #location ~* /(\w+)/static(?:/_[\d]+.[\d]+.[\d]+)?/(.*)$ { > # alias /home/www-data/web2py/applications/$1/static/$2; > # expires max; > #} > location ~* /(\w+)/static/ { > root /home/www-data/web2py/applications/; > #remove next comment on production > #expires max; > } > location / { > #uwsgi_pass 127.0.0.1:9001; > uwsgi_pass unix:///tmp/web2py.sock; > include uwsgi_params; > uwsgi_param UWSGI_SCHEME $scheme; > uwsgi_param SERVER_SOFTWARE nginx/$nginx_version; > } > } > server { > listen 443 default_server ssl; > server_name $hostname; > ssl_certificate /etc/nginx/ssl/web2py.crt; > ssl_certificate_key /etc/nginx/ssl/web2py.key; > ssl_prefer_server_ciphers on; > ssl_session_cache shared:SSL:10m; > ssl_session_timeout 10m; > ssl_ciphers > ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA; > ssl_protocols SSLv3 TLSv1; > keepalive_timeout 70; > location / { > #uwsgi_pass 127.0.0.1:9001; > uwsgi_pass unix:///tmp/web2py.sock; > include uwsgi_params; > uwsgi_param UWSGI_SCHEME $scheme; > uwsgi_param SERVER_SOFTWARE nginx/$nginx_version; > } > > } > > > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.