jleck / elasticbeanstalk-nginx-php Goto Github PK
View Code? Open in Web Editor NEWAWS Elastic Beanstalk Nginx/PHP-FPM build script with addon packages
License: MIT License
AWS Elastic Beanstalk Nginx/PHP-FPM build script with addon packages
License: MIT License
I'm installing per the instructions, but nginx won't start. If I try to login and start it manually it gives me this error:
nginx: [emerg] getpwnam("elasticbeanstalk") failed in /etc/nginx/nginx.conf:11
The AMI you reference is probably a legacy container and doesn't exist. I used this one: ami-1624987f
sudo: history: command not found
After tried the build script I get this error using the AMI: ami-1624987f ... any ideas how to fix this?
Hi,
Out of interest, why does the build script turn off the autostart on boot (chkconfig) options? Does another system start nginx when booting up a new instance or restarting one?
Cheers,
Rob
I have a composer.json in my root directory and I installed using --composer - but post deploy there is no vendor directory.
To try to compensate I added postDeploy.sh with the following contents
curl -s https://getcomposer.org/installer | php
php composer.phar
rm -f composer.phar
rm -r composer.json
rm -f ${0##*/}
I find postDeploy that the postDeploy.sh file is still there and doesn't seem to have run
Thanks for writing the cool software.
I deployed my app to it. If I hit / I get index.php and that works great.
Trying to hit /signin (a directory containing an index.php file) results in the following
curl -v http://php.zork.com/signin/
< HTTP/1.1 301 Moved PermanentlyGET /signin HTTP/1.1
User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5
Host: php.zork.com
Accept: /
If I disable varnish this should resolve?
The first deployment is OK, subsequent ones produce errors - errors can't be viewed (choosing show errors in the environment panel does nothing) and the app never works again unless I do a "rebuild environment".
I'm kind of done with this thing but I thought I'd let you know.
There is nothing in the log snapshot either BTW.
We're using a forked version of this project to deploy a PHP Project on ElasticBeanstalk.
It runs perfectly after a bit of fpm / nginx config tuning, however we have an issue with the initial deployment.
We need to load in a number of Composer dependencies (~15) and a couple of them are large repos (Zend Framework 2 is a big issue). The whole process inside the postDeploy.sh script can take 4-5 minutes, during which time the Host Manager fails to respond with an OK status and the ELB also changes into an Unavaliable state.
Are there any currently:
Any ways to avoid the old version of the app being taken out of rotation before the new one is successfully deployed.
Any plans to change the behaviour, e.g create a completely new deploy folder per version of the application, which is symlinked to /var/www/html only once the deployment is completed?
At the moment we have to have 3 versions of our production environment on ElasticBeanstalk otherwise we have ~10mins of downtime per deploy. We have to manually update the root domain DNS to point to the most up-to-date environment once the environment has corrected itself. This means we can end up with x3 the AWS cost.
Whilst replacing Apache with Nginx one of the default HostManager directory configs seems to have been missed. When I try and snapshot the instances logs from the Console I get a blank page.
Looking at HostManager, this error is in the log:
/usr/bin/tail: cannot open `/var/log/httpd/error_log' for reading: No such file or directory
First off, amazing find. I've been wanting to use NGINX with ELB for the longest time. Thank you thank you.
I'm having one issue with setting up the AMI. I've enabled Composer. One I build the application, it eventually fails because it fails the health check. I try to SSH into the instance. NGINX is off and I try to start it and I get this error:
service nginx res[ec2-user@ip-10-158-27-69: ~] $ service nginx start
Starting nginx: nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)
2012/11/28 21:18:03 [warn] 2093#0: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:26
2012/11/28 21:18:03 [emerg] 2093#0: mkdir() "/var/lib/nginx/tmp/client_body" failed (13: Permission denied)
[FAILED]
Any ideas?
I was wondering if it's possible to support multiple versions of PHP. I know I can just edit the build file but having it built in would be even better?
Thanks!
Thank you for this great stuff. I need some modification.
I need eaccelecrator instead of APC, want to use nginx itself as reverse proxy instead of varnish, how can I modify your build. I will install Magento on this modified environment.
I have created new instance form elastic beanstalk standard AMI, then applied this build, all have been installed properly. I've created new AMI out of that instance, launched new Elastic Beanstalk environment with new AMI.
All seem to be working fine, but I can't see rotated logs into my S3. The event log of the enviroment says, that logs are being rotated to S3, but I couldn't see them there.
Would you be kind to suggest me something?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.