Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It could be one of the following things:</p> <ol> <li>Your UWSGI socket is not located at /tmp/uwsgi.sock</li> <li>The uwsgi or www-data user does not have permissions to create uwsgi.sock in your /tmp directory.</li> </ol> <p>If you installed Uwsgi on Ubuntu 12.04, the config file should be located at:</p> <pre><code>/usr/share/uwsgi/conf/default.ini </code></pre> <p>Here's the default socket config in that file:</p> <pre><code># bind to UNIX socket at /run/uwsgi/&lt;confnamespace&gt;/&lt;confname&gt;/socket socket = /run/uwsgi/%(deb-confnamespace)/%(deb-confname)/socket </code></pre> <p>You should create an app-specific config file that looks similar to mine. I can confirm it works inside a virtual environment.</p> <pre><code>sudo vim /etc/uwsgi/apps-available/your-app.ini </code></pre> <p>The contents of your-app.ini:</p> <pre><code>[uwsgi] base = /home/nick/your-app.com #location of the flask application file file = /home/nick/your-app.com/main.py #uwsgi varible only, does not relate to your flask application callable = app #uwsgi plugins plugins = http,python #to create within a virtual environment home = %(base)/venv pythonpath = %(base) socket = /tmp/%n.sock logto = /var/log/uwsgi/%n.log workers = 3 </code></pre> <p>To enable, you need to symlink and restart nginx.</p> <pre><code>#make sure that any user to write to the /tmp directory sudo chmod 777 /tmp sudo ln -s /etc/uwsgi/apps-available/your-app.ini /etc/uwsgi/apps-enabled/your-app.ini sudo service uwsgi restart </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload