CentOS + Nginx

Permalink 1 user found helpful
Right now we are doing a server migration from an Apache/Plesk server to a new Nginx server. So far we have not come across any errors though getting the vhost and SSL stuff to work was not so straight forward. About 12 domains total running c5 and no hiccups yet.

So what I am asking here is if there is anything any of you may have a encountered I should be aware of.

ideasponge
 
thephilm replied on at Permalink Reply
thephilm
I've not used this setup before, but would love if this thread continued - letting us know what issues you may have encountered (or not!) so we have it as a resource!
-Phil
ideasponge replied on at Permalink Reply
ideasponge
Ok we came across our first real problem when installing a fresh copy.

This issue pertains to Support for c5 Request URLs and I get this msg:
Concrete cannot parse the PATH_INFO or ORIG_PATH_INFO information provided by your server.

We were able to get Pretty URL's working for existing installs by adding this to our nginx.conf file (it was actually added to the vhost configuration file for each domain

location / {
                        index  index.php index.html index.htm;
                        if (!-f $request_filename){
                                set $rule_0 1$rule_0;
                         }
                        if (!-d $request_filename){
                                set $rule_0 2$rule_0;
                        }
                        if ($rule_0 = "21"){
                                rewrite ^/(.*)$ /index.php/$1 last;
                        }
                }


I will update once we have a fix.

PS: There is no <?php or ?> in the nginx.conf file, this forum just added that by itself
ideasponge replied on at Permalink Reply
ideasponge
Here is a helpful tool for converting your htaccess file to nginx config.

http://www.anilcetin.com/convert-apache-htaccess-to-nginx/...