Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9200015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:40:17+00:00 2026-06-17T22:40:17+00:00

My NGINX configuration: server { server_name 127.0.0.1; listen 4450; location ~* ^/.*$ { include

  • 0

My NGINX configuration:

server {
  server_name 127.0.0.1;
  listen 4450;
  location ~* ^/.*$ {
  include uwsgi_params;
    uwsgi_pass unix:/tmp/esrvadmin.sock;
  }
}

uWSGI start up:

uwsgi --uid root -s /tmp/esrvadmin.sock --chown-socket nobody:root \
  --file /var/www/sitios/manten/srv.py \
  --processes 2 --callable app --pidfile /var/run/edesarrollos/esrvadmin.pid

Python with flask code:

import os, subprocess
from flask import Flask, abort, request
app = Flask(__name__)

DETO_DIR = '/var/www/sitios/manten/detos'

@app.route('/detonate')
def index():
  #return str(subprocess.check_output(['ls','-l']))
  token = request.args.get('token','')
  if token != '':
     # Si no existe el directorio de detonatores, se crea
     if not os.path.exists(DETO_DIR):
       os.mkdir(DETO_DIR)
     if os.path.isfile(DETO_DIR+"/"+token):
       try:
         os.system(open(DETO_DIR+"/"+token).read())
       except Exception as ex:
         return str(ex)
       return "Reiniciado Correctamente"
     else:
       abort(404) 
  else:
    abort(404)

if __name__ == "__main__":
    app.run(debug=True,host='0.0.0.0')

In main mode, i can run anything inside os.system(“something args”) and receive its HTTP response, even with “service something start” and it finish right. Also i tried with subprocess functions, no luck.

But when i run from NGINX-uWSGI, i get a waiting forever http request, of course never response but it does the job (starting a service).

The best error description in log i found:

2013/01/28 03:38:24 [error] 3978#0: *3 upstream timed out (110: Connection timed out) 
while reading response header from upstream, client: 
127.0.0.1, server: 127.0.0.1, request: "GET
/detonate?token=start-    
a81260812b643d8672ccf9570033109f200595779e0a352e630a75760328e2d375025ef349e
3d599f368092abb63511f-23611e81194b04d5d0a6d0f02baf7fb9
HTTP/1.1", upstream: "uwsgi://unix:/tmp/esrvadmin.sock:", host: "127.0.0.1:4450"

Any idea of what could be happening ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T22:40:19+00:00Added an answer on June 17, 2026 at 10:40 pm

    read here: http://uwsgi-docs.readthedocs.org/en/latest/ThingsToKnow.html (the –close-on-exec part) and please,please, please, DO NOT RUN uWSGI as root !

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this configuration of nginx : server { listen 80; server_name example.com www.example.com;
I have the following nginx configuration fragment: server { listen 80; server_name mydomain.io; root
I try to use nginx with memcached with this configuration: server { ... location
I use such Nginx configuration for the domain: server_name_in_redirect off; listen 80; server_name ~^(www\.)?(.+)$;
I have built svn server on my nginx webserver. my nginx configuration is server
anybody knows how to configure server {} in configuration file of nginx server? I
Some help would be appreciated - keep getting Forbidden 403 error. Nginx configuration: listen
To my knowledge Nginx can only password protect directories from within the configuration file(s).
nginx is a killer static file server. it can serve node.js , as in
I have installed Nginx 1.2.0 with Passenger on my Mac Mini running Lion Server.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.