You are not logged in.
Hello,
First of all, excuse me for my English. I hope you will unterstand my problem.
I've been mounting my web server these two last weeks. All was functionnal until I reboot my server. It is served by nginx and the website was developped with Python using Flask and Jinja2 for the templates. I've been searching for the problems but couldn't find it.
Here my nginx conf :
user web;
worker_processes 2;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
keepalive_timeout 65;
gzip on;
server {
listen 80;
server_name splab.no-ip.org;
charset utf-8;
location / { try_files $uri @yourapplication; }
location @yourapplication {
include uwsgi_params;
uwsgi_pass unix:/tmp/uwsgi.sock;
}
}
}
It seems to be OK... For redirecting port, I use uWSGI with sockets (as you can see in the nginx conf). Permissions problems ?
srwxr-xr-x 1 web web 0 19 févr. 14:58 uwsgi.sock
Than I've been looking for the error.log file provided by Nginx :
2013/02/19 14:48:58 [error] 260#0: *99 connect() to unix:/tmp/uwsgi.sock failed (111: Connection refused) while connecting to upstream, client: 89.28.147.206, server: splab.no-ip.org, request: "GET /favicon.ico HTTP/1.1", upstream: "uwsgi://unix:/tmp/uwsgi.sock:", host: "splab.no-ip.org"
Connection refused ? What does it mean ? I've already searched but I didn't find the answer.
I'm sure my .py file is correct but I prefer post...
from flask import Flask, request, session, g, redirect, url_for, abort, render_template, flash
app = Flask(__name__)
app.config.from_object(__name__)
@app.route('/')
def index():
return render_template('index.html', foo='42')
@app.route('/about')
def about():
return render_template('about.html', foo='42')
if __name__ == '__main__':
app.run()
I'm running the server using :
uwsgi -s /tmp/uwsgi.sock -w splab:app
and
python2.7 splab.py
runned in the / of nginx directory (/usr/share/nginx/html/)
My website link : http://splab.no-ip.org/
Thanks
Jlzz
Last edited by Jlzz (2013-02-21 20:07:10)
Offline
Little up ! No idea ?
EDIT: Problem solved.
Last edited by Jlzz (2013-02-21 20:06:46)
Offline