question about nginx-apache setup with dual php versions

dmacleo

Verified User
Joined
Jun 21, 2012
Messages
631
right now I am running php 5.5 and 5.4 due to older script not working well on 5.5.
been wanting to setup the nginx-apache as I know the proxy/cache works well for my sites but I am wondering if running the dual php will be an issue.
I didn't see mention of anyone running dual with nginx/apache, if anyoen is could you let me know if there were problems?
thanks
 
Hello,

We have custom bind of NGINX+Apache with dual PHP versions running OK (custombuild 2.0 with PHP selector). And the fact that we use our own configuration for NGINX+Apache should not differ much, as PHP is still working through Apache.
 
Hello,

We have custom bind of NGINX+Apache with dual PHP versions running OK (custombuild 2.0 with PHP selector). And the fact that we use our own configuration for NGINX+Apache should not differ much, as PHP is still working through Apache.

thank you, this helps a lot. I'll probably try it later today and see how bad I can break stuff :)
you have any issues with large uploads (like for video site) with this?
 
I hardly can recollect any. Though I don't run video hosting for my own I did some setups for my customers. There are settings in NGINX and PHP which can be addjusted to allow to upload large files. And of course NGINX can be built with upload progress module so to allow to use upload progress bar on your pages. Very nice thing by the way (http://wiki.nginx.org/HttpUploadProgressModule)
 
I hardly can recollect any. Though I don't run video hosting for my own I did some setups for my customers. There are settings in NGINX and PHP which can be addjusted to allow to upload large files. And of course NGINX can be built with upload progress module so to allow to use upload progress bar on your pages. Very nice thing by the way (http://wiki.nginx.org/HttpUploadProgressModule)
I've used that before, been long time since I recompiled with extra addons so will take me a bit t remember everything. I also use the mod_h264 for nginx and the flv streaming one. allows pseudoe streaming on ngix as it does on apache.
 
1 other question please, were there any issues swapping from apache only dual php to the nginx/apache setup?
by that I mean during the actual builds.
if I am right apache itself would stay the same except for listening ports.
 
Not sure yet how it's done with custombuild, but depending on our needs we either bind apache to 127.0.0.1:80 or change TCP port from 80 to 88 for example. I guess custombuild will do change TCP port from 80 to somethings else. Here might be issues with some commerce software which binds their licenses to a server IP, if that's the case then do not bind apache to 127.0.0.1, just change TCP port. And some software might work wrong if you change port from 80 to something else. So we consider needs of our customer when implement such a configuration.


When you use NGINX+Apache+PHP it is mostly the same as if you run Apache+PHP if to look from a position of a site owner. Most users won't even see difference. Of course there might be some issues with .htaccess file. If you configure nginx to serve static files directly (bypassing apache) then you probably won't be able to restrict access to a folder/file with the help of .htaccess (Order allow,deny or basic authorisation might not work there). So if you are planning to host video files then you probably will need to store them out of public_html directory if you need to restrict access to them.
 
well since its nginx proxying to apache for caching IIRC htaccess still handled by apache so I expect that will be ok. if not I saved nginx rewite rules from when I was running ONLY nginx here. Also saved the conf files with the caching and compress rules.
all domains/sites on server are mine which helps a bit.
just trying to make sure I am aware of all pitfalls when I convert, since I had done apache to nginx then back to apache before I expect I am experienced enough but...never hurts to ask :)
 
Back
Top