Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

run Flask server production mode? #372

Open
mathog opened this issue Aug 2, 2017 · 0 comments
Open

run Flask server production mode? #372

mathog opened this issue Aug 2, 2017 · 0 comments

Comments

@mathog
Copy link

mathog commented Aug 2, 2017

Hi all. I am a rank beginner with this software. The instructions say to do:

make -C api run

to run the Flask server on port 5000. That works interactively in a virtualenv. But how are you folks setting that up to run automatically, as opposed to manually from a terminal window? (Elasticsearch was configured to run on port 9200 automatically with the instructions in the link from the installation part of README.md, no problem there.)

After some work nginx also now works. The instructions don't say so but there was a long list of default settings on this CENTOS "server" installation that kept nginx from serving pages. For future reference, these were:

  1. path to target directory had directories without "x" privs set. Web server runs as user "nginx" but directory belongs to user "agr". Use
    namei -om path_to_web_directory
    to see those.

  2. SELINUX was active and needed
    chcon -Rt httpd_sys_content_t /home/agr/agr/webapp/dist

  3. Default iptables blocks port 80. Add this to /etc/sysconfig/iptables
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

  4. apache was installed and running. Even though no port 80 was seen by nmap the httpd
    process was hanging onto it somehow. To resolve:

service httpd stop
chkconfig http off

Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant