{"id":17160364,"url":"https://github.com/codenameyau/elastic-beanstalk-nginx-flask","last_synced_at":"2025-03-24T15:12:08.895Z","repository":{"id":36245695,"uuid":"40550055","full_name":"codenameyau/elastic-beanstalk-nginx-flask","owner":"codenameyau","description":"Good luck! Use OpsWorks instead!","archived":false,"fork":false,"pushed_at":"2015-11-09T02:17:24.000Z","size":164,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T20:19:48.088Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codenameyau.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-11T15:32:58.000Z","updated_at":"2018-07-28T21:57:01.000Z","dependencies_parsed_at":"2022-08-17T22:35:14.607Z","dependency_job_id":null,"html_url":"https://github.com/codenameyau/elastic-beanstalk-nginx-flask","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenameyau%2Felastic-beanstalk-nginx-flask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenameyau%2Felastic-beanstalk-nginx-flask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenameyau%2Felastic-beanstalk-nginx-flask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codenameyau%2Felastic-beanstalk-nginx-flask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codenameyau","download_url":"https://codeload.github.com/codenameyau/elastic-beanstalk-nginx-flask/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245294775,"owners_count":20591909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T22:24:38.304Z","updated_at":"2025-03-24T15:12:08.852Z","avatar_url":"https://github.com/codenameyau.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# elastic-beanstalk-nginx-flask\nThis is a hello world **Flask** application that runs with AWS **Elastic Beanstalk**\nbehind **Nginx** and **uWSGI**. Just kidding.\n\nAfter attempting this myself, I wanted to share my experience trying\nto configure Elastic Beanstalk with Nginx. **It's terrible, don't do it.**\nUntil AWS officially supports Nginx as an alternative to Apache, it's\nnot worth the effort. You may be able to get away with it by hacking\nthe configuration files with `.ebextensions`, but in the end your\nconfiguration files will be difficult to understand, and your\ndeployment process will face unexpected issues that will be\ndifficult to troubleshoot.\n\n**Note:** Python applications are tied to Apache. If you decide to use\nnode.js, Elastic Beanstalk will run with nginx instead.\n\n### Still wanna go for it?\n\nIf you really want to use Nginx instead of Apache on AWS (I want to too),\nmy suggestion is to skip EB and use **OpsWorks with Chef** for provisioning.\n\nIf for some reason, you still really want to use Nginx with EB,\nthen here are tutorials that I've tried. They worked up until a certain\npoint, but **automated deployments ended up failing** because EB ran\npre and post-deployment hooks that triggered unwanted Apache restarts.\nIf Apache isn't running, then everything breaks. If you're stuck,\nSSH into the EC2 instance and examine your logs at `/var/log/eb-activity`,\n`/var/log/http`, and `/var/log/nginx`. Good luck!\n\n- [Nginx and EB with Django uWSGI](https://github.com/wolfg1969/elastic-beanstalk-nginx-uwsgi-django)\n- [Replacing Apache with Nginx on AWS](http://www.nczonline.net/blog/2012/09/14/replacing-apache-with-nginx-on-elastic-beanstalk/)\n- [Official AWS EB Flask Tutorial](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-flask.html)\n\n\n### Running the application\n\nuWSGI Locally:\n```\nuwsgi --http 127.0.0.1:8000 -w application:application\n```\n\nuWSGI Nginx:\n```\nuwsgi --socket 127.0.0.1:8000 -w application:application\n```\n\nGunicorn:\n```\ngunicorn application:application\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodenameyau%2Felastic-beanstalk-nginx-flask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodenameyau%2Felastic-beanstalk-nginx-flask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodenameyau%2Felastic-beanstalk-nginx-flask/lists"}