How to wrap nginx/uwsgi around Flask?


Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
Wrench How to wrap nginx/uwsgi around Flask?

I've SSH installed a Python 3.5 application on CentOS along with uwsgi and nginx, but after doing a sudo vi /etc/nginx/nginx.conf to edit the nginx config file as per usual, the response is currently:

nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

these are the contents of the /etc/nginx/nginx.conf file:

Code:
sendfile            on;
tcp_nopush          on;
tcp_nodelay         on;
keepalive_timeout   65;
types_hash_max_size 2048;

include             /etc/nginx/mime.types;
default_type        application/octet-stream;

include /etc/nginx/conf.d/*.conf;

server {
    listen      [::]:80 default_server;
    server_name  _;
    root         /var/www/html/<directory//;

    location / {
    }

The server is currently showing an nginx error page.

This is the results of a sudo service nginx configtest:

Code:
2017/07/18 15:34:04 [crit] 2829#0: *41 connect() to unix:/var/www/html/pricing-service/socket.sock failed (2: No such file or directory) while connecting to upstream, client: 90.63.208.189, server: localhost, request: "HEAD [url]178.62.201.111:80/phpmyadmin2013/ 1.1", upstream: "uwsgi://unix:/var/www/html/pricing-service/socket.sock:", host: "178.62.201.111"

Smilie



Moderator's Comments:
Mod Comment Please use CODE tags correctly as required by forum rules! (Although trying to use them is appreciated!)

Last edited by RudiC; 07-18-2017 at 01:31 PM.. Reason: Changed ICODe to CODE tags.
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Security module in nginx
mnnn
hi By the command yum install nginx Want a security modules Security modules such as virtual hosts I apply Do you know a quick solution? thanks... Red Hat
0
Red Hat
NGINX Setup
ramky79
Here is my issue: I have two web servers hosting web services (Server A and Server B) I'd like to configure NGINX to achieve load balancing. Do I install NGINX on a third new server, or is it something that gets installed on Server A and Server B? Please share some information. ...... UNIX for Dummies Questions & Answers
0
UNIX for Dummies Questions & Answers
How to configure NGINX?
vikatakavi
Hi , I installed NGINX and when i i go see the browser it says welcome If you see this page, the nginx web server is successfully installed and working. Further configuration is required. is there any kind of document to configure that(i am completly new for this)... UNIX for Dummies Questions & Answers
1
UNIX for Dummies Questions & Answers
activecampaign rewrite rules for nginx webserver
unimaxlin
Could you help me to write nginx rewite rules for activecampaign at present they only have a apache rewrite rules which to be put in .htaccess cat .htaccess <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / # KB RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME}...... Web Development
0
Web Development
UNIX and Linux

Unix (trademarked as the UNIX certification mark) is a very mature family of multitasking, multiuser computer operating systems that evolved from the original AT&T Unix. Unix development starting in the 1970s by legendary Bell Labs programmers Ken Thompson, Dennis Ritchie, and others. Unix was first targeted for the Bell System and AT&T licensed Unix to outside parties. In the 1970s time period, this lead to a variety of for-profit as well as not-for-profit Unix variants.
In the early days, this included the University of California, Berkeley (BSD), Microsoft (Xenix), IBM (AIX), and Sun Microsystems (Solaris). In the early 1990s, AT&T sold their Unix rights to Novell. In 1995 Novell sold their Unix business to the Santa Cruz Operation (SCO). The UNIX trademark was passed to The Open Group, a "neutral" industry consortium. The Open Group promoted the use of the UNIX trademark for certified operating systems that comply with the Single UNIX Specification (SUS). In 2014 Apple's macOS became the Unix version with the largest global install base and macOS remains the largest Unix-user base today.
Linux is a family of open source Unix-like operating systems based on the Linux kernel. The Linux kernel is an operating system kernel first released by Linus Torvalds on 17 September 1991. Linux distributions include the Linux kernel, system software and libraries. Popular free open source Linux distributions include Debian, Fedora, and Ubuntu. Commercial Linux distributions include Red Hat Enterprise Linux and SUSE Linux Enterprise Server. Linux may be freely modified and redistributed. Anyone on the planet may create a Linux distribution for any purpose.
Please enjoy and help our forum community by "showing your work" and posting your code, even when your code is not working as expected. To help others help you, please wrap your code blocks, sample input, sample output, error messages, and other data in CODE tags and wrap your short commands and short data objects in ICODE tags. We were all beginners in the beginning. If you have any questions about how to register or how to post, please contact us in Live Chat. Thank you and enjoy this "forever free" technical support community for UNIX, Linux and computer information technology in general.