Trouble in configuring fir REST support

Anoop Alias anoopalias01 at gmail.com
Fri Nov 25 12:14:33 UTC 2016


yes nothing to do with the problem at hand.

You can also try to execute the index.php using the php (cli) and see if if
there is an error etc.

probably turn on display_error in php.ini .

Its strange nginx is not logging any errors.

Since the phpinfo page is working..this is more or less a problem with php
than nginx I think.

Good luck.

On Fri, Nov 25, 2016 at 5:35 PM, <hemanthnews at yahoo.com> wrote:

> Hi Anoop,
>
> Phpinfo() is working fine … is there something to look  for specifically?
>
>
>
> I need to move from APACHE to NGINX .. so as a back-up, APACHE has been
> configured to work on 9080 port. Once NGINX works, APACHE will be removed.
>
>
>
> Thanks for pointer on “in the server {} block instead of location /  and
> repeating in php . Read nginx pitfalls for a better understanding of why
> this is good.” – will look into this. I guess this is nothing to do with
> the problem
>
>
>
> --------------------
> -Best
> Hemanth
>
>
>
> *From: *Anoop Alias <anoopalias01 at gmail.com>
> *Sent: *Friday, November 25, 2016 5:23 PM
> *To: *hemanthnews at yahoo.com
> *Cc: *Nginx <nginx at nginx.org>
>
> *Subject: *Re: Trouble in configuring fir REST support
>
>
>
> You can put a phpinfo page and see if that works.
>
> I am not sure why you mention apache as you are not proxy passing
>
>
>
> Also while not related to the error  Try
>
>
>
> root /opt/riversilica/pixflex/install/app_server/pixflex/public;
>
>
>
> in the server {} block instead of location /  and repeating in php . Read
> nginx pitfalls for a better understanding of why this is good.
>
>
>
>
>
>
>
>
>
> On Fri, Nov 25, 2016 at 5:17 PM, <hemanthnews at yahoo.com> wrote:
>
> Hi Anoop,
>
> The /var/log/nginx/error.log file is empty …
>
>
>
> --------------------
> -Best
> Hemanth
>
>
>
> *From: *Anoop Alias <anoopalias01 at gmail.com>
> *Sent: *Friday, November 25, 2016 5:15 PM
> *To: *Nginx <nginx at nginx.org>
> *Cc: *hemanthnews at yahoo.com
> *Subject: *Re: Trouble in configuring fir REST support
>
>
>
> What does the error log say?
>
>
>
> On Fri, Nov 25, 2016 at 5:03 PM, Hemanthnews via nginx <nginx at nginx.org>
> wrote:
>
> Hi,
>
> Following is the environment
>
> OS: CentOS 7 (64 bit)
>
> NGINX: 1.10.1
>
> PHP/PHP-FPM:  5.6
>
> ZF2
>
> Apache 2.4
>
>
>
> Nginx configured on port-80 and apache on port-9080
>
>
>
> I am having trouble in configuring for REST support using nginx + php +
> zf2
>
> When I enter <ip-address:9080>/user-rest while using APACHE (Port: 9080),
> I get all the user data
>
> When I try with <ip-address>/user-rest  (nginx on port:80), I get a blank
> screen  with Firefox and Chrome reports “HTTP ERROR 500”
>
>
>
>
>
> Following is my configuration file under /etc/nginx/conf.d/pixflex_
> nginx.conf
>
> Would appreciate feedback / fix to support REST
>
>
>
> server {
>
>       2         listen       80 default;
>
>       3         listen       443 ssl;
>
>       4         server_name  $hostname;
>
>       5         client_max_body_size 8192M;
>
>       6         client_header_timeout 300s;
>
>       7         client_body_timeout 300s;
>
>       8         fastcgi_read_timeout 300s;
>
>       9         fastcgi_buffers 16 128k;
>
>      10         fastcgi_buffer_size 256k;
>
>      11
>
>      12         #SSL Support - key & certificate location;
>
>      13         ssl_certificate /etc/pki/tls/certs/ca.crt;
>
>      14         ssl_certificate_key /etc/pki/tls/private/ca.key;
>
>      15
>
>      16         #VirtualHost for HTML Support
>
>      17         location / {
>
>      18                 #root   /usr/share/nginx/html;
>
>      19                 limit_rate 512k;
>
>      20                 limit_conn pfs 100;
>
>      21                 add_header 'Access-Control-Allow-Origin' "*";
>
>      22                 add_header 'Access-Control-Allow-Credentials'
> 'true';
>
>      23                 add_header 'Access-Control-Allow-Headers'
> 'Content-Type,accept,x-wsse,origin';
>
>      24                 add_header 'Access-Control-Allow-Methods' 'GET,
> POST, OPTIONS, PUT, DELETE';
>
>      25
>
>      26                 root /opt/riversilica/pixflex/
> install/app_server/pixflex/public;
>
>      27                 index  index.php index.phtml index.html index.htm;
>
>      28                 try_files $uri $uri/ /index.php$is_args$args;
>
>      29          }
>
>      30
>
>      31         #error_page  404              /404.html;
>
>      32         #redirect server error pages to the static page /50x.html
>
>      33
>
>      34         #error_page   500 502 503 504  /50x.html;
>
>      35         #location = /50x.html {
>
>      36         #       root   /usr/share/nginx/html;
>
>      37         #}
>
>      38
>
>      39         #proxy the PHP scripts to Apache listening on 127.0.0.1:80
>
>      40         #location ~ \.php$ {
>
>      41         #    proxy_pass   http://127.0.0.1;
>
>      42         #}
>
>      43
>
>      44         #pass the PHP scripts to FastCGI server listening on
> 127.0.0.1:9000
>
>      45         location ~ \.php$ {
>
>      46                 #root   /usr/share/nginx/html;
>
>      47                 limit_rate 512k;
>
>      48                 limit_conn pfs 100;
>
>      49
>
>      50                 root /opt/riversilica/pixflex/
> install/app_server/pixflex/public;
>
>      51                 try_files $uri =404;
>
>      52                 fastcgi_pass   127.0.0.1:9000;
>
>      53                 fastcgi_index  index.php;
>
>      54                 fastcgi_param SCRIPT_FILENAME
> $document_root$fastcgi_script_name;
>
>      55                 fastcgi_split_path_info ^(.+\.php)(/.+)$;
>
>      56                 fastcgi_intercept_errors on;
>
>      57                 fastcgi_read_timeout 300;
>
>      58                 include fastcgi_params;
>
>      59         }
>
>      60
>
>      61         # deny access to .htaccess files, if Apache's document root
>
>      62         # concurs with nginx's one
>
>      63         location ~ /\.ht {
>
>      64                 deny  all;
>
>      65         }
>
>      66 }
>
>
>
>
>
>
>
>
>
>
>
> --------------------
> -Best
> Hemanth
>
>
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
>
>
>
>
> --
>
> *Anoop P Alias*
>
>
>
>
>
>
>
>
>
> --
>
> *Anoop P Alias*
>
>
>
>
>



-- 
*Anoop P Alias*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20161125/1ad147d9/attachment.html>


More information about the nginx mailing list