Open ranib opened 10 years ago
No problem. In fact that is a simple operation:
1 - Download nginx source and compile following nginx instruction (tip: use
your openshift gear to do that)
2 - Copy new binaries into versions/shared/
.
3 - Commit and push.
Thanks, but I'm completely lost here. I downloaded nginx 1.7.0 from here http://wiki.nginx.org/Install. It is a zip file in my download folder. How do I compile it? How do I use my gear to do it? I'm sorry I never did this before.
Maybe you can compile it on your own machine.
First download your repo somewhere. We will use /tmp as the base working directory.
cd /tmp
git clone git@github.com:ranib/openshift-nginx-php-fpm.git
Download and compile nginx:
curl ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.35.tar.gz | tar xzvf -
curl http://nginx.org/download/nginx-1.7.0.tar.gz | tar xzvf -
cd nginx-1.7.0
./configure --with-pcre=../pcre-8.35
make
Now let's copy the binary into your nginx cartridge repo:
cp objs/nginx /tmp/openshift-nginx-php-fpm/versions/shared/usr/sbin/nginx
cd /tmp/openshift-nginx-php-fpm/
git commit -a -m 'Update nginx'
git push
Now you can create your app using you own cartridge :)
rhc app create nginx https://reflector-getupcloud.getup.io/reflect?github=ranib/openshift-nginx-php-fpm
Cheers!
Thank you, now I got this message:
$ ./configure --with-pcre=../pcre-8.35 checking for OS
./configure: error: the HTTP gzip module requires the zlib library.
You can either disable the module by using --without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library
statically from the source with nginx by using --with-zlib=
You must compile it on linux.
If you don't have a linux machine, create any app on openshift, run "rhc
ssh
On Thu, Jun 19, 2014 at 9:27 PM, ranib notifications@github.com wrote:
Thank you, now I got this message:
$ ./configure --with-pcre=../pcre-8.35 checking for OS
- MINGW32_NT-6.2 1.0.12(0.46/3/2) i686 checking for MINGW32_NT-6.2 specific features
./configure: error: the HTTP gzip module requires the zlib library. You can either disable the module by using --without-http_gzip_module option, or install the zlib library into the system, or build the zlib library statically from the source with nginx by using --with-zlib= option.
— Reply to this email directly or view it on GitHub https://github.com/getupcloud/openshift-nginx-php-fpm/issues/13#issuecomment-46633311 .
--- Mateus de Oliveira Caruccio
Unfortunately, when I try to use my newly updated repo to create a new app, it gives me following message:
$ rhc app create phpfpm https://reflector-getupcloud.getup.io/reflect?github=ranib/openshift-nginx-php-fpm DL is deprecated, please use Fiddle The cartridge 'https://reflector-getupcloud.getup.io/reflect?github=ranib/openshift-nginx-php-fpm' will be downloaded and installed
Application Options Domain: mydomain Cartridges: https://reflector-getupcloud.getup.io/reflect?github=ranib/openshift -nginx-php-fpm Gear Size: default Scaling: no
Creating application 'phpfpm' ... Building nginx configuration Building php-fpm configuration Failed to execute: 'control start' for /var/lib/openshift/XXXb25895XXX463341000XXX/nginx-php-fpm
nginx: [emerg] unknown directive "set_real_ip_from" in /var/lib/openshift/XXXb25895XXX463341000XXX/app-root/runtime/repo//config/nginx.d/default.conf:6
I created new fork of your repo, updated nginx to 1.7.0, this time on Korora 20 desktop. Then I try to create an app and received following error: Creating application 'nginx' ... Building nginx configuration Building php-fpm configuration Failed to execute: 'control start' for /var/lib/openshift/53b081de4382ec58b60000c1/nginx-php-fpm
/var/lib/openshift/53b081de4382ec58b60000c1/nginx-php-fpm//usr/sbin/nginx: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /var/lib/openshift/53b081de4382ec58b60000c1/nginx-php-fpm//usr/sbin/nginx)
Google did not find me much help on this issue.
Any special reason why you don't compile nginx on openshift just as on your Korora 20? rhc ssh appname, replace appname to yours here. Everything you will need is prepared by openshift
Openshift has a small timeout when creating your app. Sometimes it fails to create it since nginx takes too long to compile.
I'm sorry, I know this question is asked many times and you have answered it also. You said it is very simple just You need to fork the repo, re-compile nginx from source (or extract binary from rpm) and overwrite files inside versions/shared/usr/* but I don't know how to compile. I read all the issues including Update nginx #5 in your repo and elsewhere, searched internet all day but did not find guide to update nginx version in my forked repo. Could you be kind enough to explain step by step how to do it in git?