I have the followed this post and discovered that I have to install py-sqlite and do several steps to make a working FreeBSD+web2py development platform. I have posted here the modified procedure. Please be aware that the /admin should be removed/disabled when deploying a production server. The following steps works using FreeBSD 11.0.
0.1.0 Web2py # cd /home # fetch http://www.web2py.com/examples/static/web2py_src.zip # unzip web2py_src.zip # cp /home/web2py/handlers/wsgihandler.py /home/web2py/ # chown -Rh www:www web2py 0.2.0 uWSGI # cd /usr/ports/www/uwsgi # make install clean Create the file /usr/local/etc/uwsgi.ini [uwsgi] pythonpath = /home/web2py/ module = wsgihandler socket = 127.0.0.1:9001 master = true chmod-socket = 664 uid = www gid = www #enable-threads = true processes = 4 socket-timeout = 180 post-buffering = 8192 max-requests = 1000 buffer-size = 32768 0.2.1 py-sqlite3 $ cd /usr/ports/databases/py-sqlite3 $ make install clean 0.3.0 Nginx # cd /usr/ports/www/nginx # make install clean 0.3.1 Self-signed SSL certificate # cd /usr/local/etc/nginx # openssl genrsa -des3 -out server.key 2048 # openssl req -new -key server.key -out server.csr # openssl x509 -req -days 3650 -in server.csr -signkey server.key -out ssl-bundle.crt # cp server.key server.key.orig # openssl rsa -in server.key.orig -out server.key 0.3.2 Edit /usr/local/etc/nginx/nginx.conf and enable HTTPS; add the following in the HTTPS section just below server_name #ssl_certificate ssl-bundle.crt; #ssl_certificate_key server.key; 0.3.3 Add to /usr/local/etc/nginx/nginx.conf in HTTPS server section: location ~ /welcome { uwsgi_pass 127.0.0.1:9001; #uwsgi_pass unix:/tmp/web2py.sock; include uwsgi_params; } location ~ /admin { uwsgi_pass 127.0.0.1:9001; #uwsgi_pass unix:/tmp/web2py.sock; include uwsgi_params; } 03.4 Make parameters_443.py # cd /home/web2py # python2.7 web2py.py -p 443 choose a password:<type your secure password here> 0.4 Configure service to be persistent edit /etc/rc.conf: nginx_enable="YES" uwsgi_enable="YES" uwsgi_flags="-T –ini /usr/local/etc/uwsgi.ini" 0.5 Start uwsgi and nginx # service uwsgi start # service nginx start -- “This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. -- E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.” Bicol University, Legazpi City, Philippines. -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.

