So I've setup my server following this tutorial: http://jronnholm.sysio.se/setup-nginx-and-uwsgi-with-python3-on-ubuntu-14-04/
See: nginx + uwsgi + python3 configuration not working
I managed to get it to work by switching /etc/nginx/sites-available/default with /etc/nginx/sites-available/pythonapp and change the sitename to _.
My /etc/nginx/sites-available/default:
server {
server_name _;
error_log /var/log/nginx/pythonapp.error.log;
access_log /var/log/nginx/pythonapp.access.log;
root /vagrant/site/python/pythonapp;
location / {
uwsgi_pass unix:/var/run/uwsgi/app/pythonapp/socket;
include uwsgi_params;
}
}
But then when I change the content of webpage.py to this:
print "Content-type: text/html\n\n"
print("lololol");
It ends up returning internal server error when I go to http://localhost:8080.
What did I do wrong?