A web application is being created using flask, uwsgi, and nginx.
[Current status]
Create a simple file with flask and complete the nginx configuration.
However, if uwsgi is not set up properly and an IP address is entered in the browser, a 502 error occurs. (Probably due to socket connection)
When the following command is entered on the command line and the server's IP address is entered in the browser, the hello world characters created by the flame are displayed.
uwsgi --socket /var/www/dir/uwsgi.sock --module hello --callable app --chmod-socket = 666
This is going well.
Because it is troublesome to describe the settings every time, the above settings are compiled in hello.ini.
uwsgi --socket /var/www/dir/uwsgi.sock --module hello --callable app --chmod-socket = 666,
Put this in hello.ini and
uwsgi --ini hello.ini
If this is entered on the command line and the ip address is passed to the browser, a 502 error will occur.
The following error has occurred.
socket option is missing and stdin is not a socket.
I read the error that the socket is missing or not a socket.
I think that socket is described in hello.ini.
# hello.ini
module = hello
callable = app
master = true
socket = /var/www/dir/uwsgi.sock
chmod-socket = 666
logto = /var/log/uwsgi_error.log
vacuum = true
die-on-term = true
processes = 1
This command works well for hello world,
uwsgi --socket /var/www/dir/uwsgi.sock --module hello --callable app --chmod-socket = 666
I don't know why this command doesn't work.
uwsgi --ini hello.ini
Please give me an explanation.
-
Answer # 1
Related articles
- c # - the car with wheelcollider does not hit the stage
- ssl - i can send with the server name of my mail server, but not with another name
- nginx - about setting of terraform in local environment
- setting up file delivery with nginx reverse proxy
- python - i was in trouble with the vc code! !!
- The Nginx + Uwsgi + Django project is deployed to the server in detail
- the timer made with javascript does not work
- html - i have a problem with the menu bar in ie
- calculate the pi with processing
- html - the bar made with border of span tag does not go to the center
- python - find the season with pandas
- numpy - get the column with the loc method
- python - the link created with the collected path does not open
- java - problems with for in the oracle exam
- nginx - i want to resolve the 404 error
- python - why does the with command say there is no __exit__?
- nginx - about setting items of uwsgi_params and uwsgi_pass
- vba excel save with the same book as overwrite save
- unity - how to open the setting file in the vfx lwrp environment
- about setting to ssl by self-signed with nginx
- Are my following assumptions about setting up nginx and where to place the various files in a flask project correct?
- python : HTTP to HTTPS nginx flask
- linux : /var/log/nginx/error.log Shows No such file or directory error even though the file exists 100% .Flask + uWSGI
- python : Do I have to restart the server after committing the project?
- There is no access to NGINX to the socket (Nginx + UWSGI + FLASK) How to set up correctly?
- postgresql - flask: the query parameter string is garbled
- apache - cannot move hierarchy in server environment
- valueerror: signal only works in main thread in flask cannot be resolved
- about setting the debug mode of flask
- python - error running flask in terminal
hello.ini does not have the section name
[uswgi]
, but it may be because the ini content is not recognized. Maybe you just forgot to include it in your question.http://uwsgi-docs.readthedocs.io/en/latest/Configuration.html