<div dir="ltr">yes nothing to do with the problem at hand.<div><br></div><div>You can also try to execute the index.php using the php (cli) and see if if there is an error etc.</div><div><br></div><div>probably turn on display_error in php.ini .</div><div><br></div><div>Its strange nginx is not logging any errors.</div><div><br></div><div>Since the phpinfo page is working..this is more or less a problem with php than nginx I think.</div><div><br></div><div>Good luck.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 25, 2016 at 5:35 PM, <span dir="ltr"><<a href="mailto:hemanthnews@yahoo.com" target="_blank">hemanthnews@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="#954F72"><div class="m_250779802516081915WordSection1"><p class="MsoNormal">Hi Anoop,</p><p class="MsoNormal">Phpinfo() is working fine … is there something to look for specifically?</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">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. </p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">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</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">--------------------<br>-Best<br>Hemanth</p><p class="MsoNormal"><u></u> <u></u></p><div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal" style="border:none;padding:0in"><b>From: </b><a href="mailto:anoopalias01@gmail.com" target="_blank">Anoop Alias</a><br><b>Sent: </b>Friday, November 25, 2016 5:23 PM<br><b>To: </b><a href="mailto:hemanthnews@yahoo.com" target="_blank">hemanthnews@yahoo.com</a><br><b>Cc: </b><a href="mailto:nginx@nginx.org" target="_blank">Nginx</a></p><div><div class="h5"><br><b>Subject: </b>Re: Trouble in configuring fir REST support</div></div><p></p></div><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">You can put a phpinfo page and see if that works. </p><div><p class="MsoNormal">I am not sure why you mention apache as you are not proxy passing</p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Also while not related to the error Try </p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">root /opt/riversilica/pixflex/<wbr>install/app_server/pixflex/<wbr>public; </p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">in the server {} block instead of location / and repeating in php . Read nginx pitfalls for a better understanding of why this is good.</p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div></div><div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">On Fri, Nov 25, 2016 at 5:17 PM, <<a href="mailto:hemanthnews@yahoo.com" target="_blank">hemanthnews@yahoo.com</a>> wrote:</p><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in"><div><div><p class="MsoNormal">Hi Anoop,</p><p class="MsoNormal">The /var/log/nginx/error.log file is empty … </p><p class="MsoNormal"> </p><p class="MsoNormal">--------------------<br>-Best<br>Hemanth</p><p class="MsoNormal"> </p><div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b>From: </b><a href="mailto:anoopalias01@gmail.com" target="_blank">Anoop Alias</a><br><b>Sent: </b>Friday, November 25, 2016 5:15 PM<br><b>To: </b><a href="mailto:nginx@nginx.org" target="_blank">Nginx</a><br><b>Cc: </b><a href="mailto:hemanthnews@yahoo.com" target="_blank">hemanthnews@yahoo.com</a><br><b>Subject: </b>Re: Trouble in configuring fir REST support</p></div><div><div><p class="MsoNormal"> </p><div><p class="MsoNormal">What does the error log say?</p></div><div><p class="MsoNormal"> </p><div><p class="MsoNormal">On Fri, Nov 25, 2016 at 5:03 PM, Hemanthnews via nginx <<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a>> wrote:</p><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt"><div><div><p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">Hi,</span></p><p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">Following is the environment </span></p><p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">OS: CentOS 7 (64 bit) </span></p><p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">NGINX: 1.10.1</span></p><p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">PHP/PHP-FPM: 5.6 </span></p><p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">ZF2 </span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">Apache 2.4</span></p><p class="MsoNormal"> </p><p class="MsoNormal">Nginx configured on port-80 and apache on port-9080</p><p class="MsoNormal"> </p><p class="MsoNormal">I am having trouble in configuring for REST support using nginx + php + zf2 </p><p class="MsoNormal">When I enter <ip-address:9080>/user-rest while using APACHE (Port: 9080), I get all the user data </p><p class="MsoNormal">When I try with <ip-address>/user-rest (nginx on port:80), I get a blank screen with Firefox and Chrome reports “<span style="font-size:9.0pt;font-family:"Segoe UI",sans-serif;color:dimgray;text-transform:uppercase;background:#f7f7f7">HTTP ERROR 500” </span></p><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Segoe UI",sans-serif;color:dimgray;text-transform:uppercase;background:#f7f7f7"> </span></p><p class="MsoNormal"> </p><p class="MsoNormal">Following is my configuration file under /etc/nginx/conf.d/pixflex_<wbr>nginx.conf</p><p class="MsoNormal">Would appreciate feedback / fix to support REST </p><p class="MsoNormal"> </p><p class="MsoNormal">server {</p><p class="MsoNormal"> 2 listen 80 default;</p><p class="MsoNormal"> 3 listen 443 ssl;</p><p class="MsoNormal"> 4 server_name $hostname;</p><p class="MsoNormal"> 5 client_max_body_size 8192M;</p><p class="MsoNormal"> 6 client_header_timeout 300s;</p><p class="MsoNormal"> 7 client_body_timeout 300s;</p><p class="MsoNormal"> 8 fastcgi_read_timeout 300s;</p><p class="MsoNormal"> 9 fastcgi_buffers 16 128k;</p><p class="MsoNormal"> 10 fastcgi_buffer_size 256k;</p><p class="MsoNormal"> 11</p><p class="MsoNormal"> 12 #SSL Support - key & certificate location;</p><p class="MsoNormal"> 13 ssl_certificate /etc/pki/tls/certs/ca.crt;</p><p class="MsoNormal"> 14 ssl_certificate_key /etc/pki/tls/private/ca.key;</p><p class="MsoNormal"> 15</p><p class="MsoNormal"> 16 #VirtualHost for HTML Support</p><p class="MsoNormal"> 17 location / {</p><p class="MsoNormal"> 18 #root /usr/share/nginx/html;</p><p class="MsoNormal"> 19 limit_rate 512k;</p><p class="MsoNormal"> 20 limit_conn pfs 100;</p><p class="MsoNormal"> 21 add_header 'Access-Control-Allow-Origin' "*";</p><p class="MsoNormal"> 22 add_header 'Access-Control-Allow-<wbr>Credentials' 'true';</p><p class="MsoNormal"> 23 add_header 'Access-Control-Allow-Headers' 'Content-Type,accept,x-wsse,<wbr>origin';</p><p class="MsoNormal"> 24 add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE';</p><p class="MsoNormal"> 25</p><p class="MsoNormal"> 26 root /opt/riversilica/pixflex/<wbr>install/app_server/pixflex/<wbr>public;</p><p class="MsoNormal"> 27 index index.php index.phtml index.html index.htm;</p><p class="MsoNormal"> 28 try_files $uri $uri/ /index.php$is_args$args;</p><p class="MsoNormal"> 29 }</p><p class="MsoNormal"> 30 </p><p class="MsoNormal"> 31 #error_page 404 /404.html;</p><p class="MsoNormal"> 32 #redirect server error pages to the static page /50x.html</p><p class="MsoNormal"> 33</p><p class="MsoNormal"> 34 #error_page 500 502 503 504 /50x.html;</p><p class="MsoNormal"> 35 #location = /50x.html {</p><p class="MsoNormal"> 36 # root /usr/share/nginx/html;</p><p class="MsoNormal"> 37 #}</p><p class="MsoNormal"> 38</p><p class="MsoNormal"> 39 #proxy the PHP scripts to Apache listening on <a href="http://127.0.0.1:80" target="_blank">127.0.0.1:80</a></p><p class="MsoNormal"> 40 #location ~ \.php$ {</p><p class="MsoNormal"> 41 # proxy_pass <a href="http://127.0.0.1" target="_blank">http://127.0.0.1</a>;</p><p class="MsoNormal"> 42 #}</p><p class="MsoNormal"> 43</p><p class="MsoNormal"> 44 #pass the PHP scripts to FastCGI server listening on <a href="http://127.0.0.1:9000" target="_blank">127.0.0.1:9000</a></p><p class="MsoNormal"> 45 location ~ \.php$ {</p><p class="MsoNormal"> 46 #root /usr/share/nginx/html;</p><p class="MsoNormal"> 47 limit_rate 512k;</p><p class="MsoNormal"> 48 limit_conn pfs 100;</p><p class="MsoNormal"> 49</p><p class="MsoNormal"> 50 root /opt/riversilica/pixflex/<wbr>install/app_server/pixflex/<wbr>public;</p><p class="MsoNormal"> 51 try_files $uri =404;</p><p class="MsoNormal"> 52 fastcgi_pass <a href="http://127.0.0.1:9000" target="_blank">127.0.0.1:9000</a>;</p><p class="MsoNormal"> 53 fastcgi_index index.php;</p><p class="MsoNormal"> 54 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_<wbr>name;</p><p class="MsoNormal"> 55 fastcgi_split_path_info ^(.+\.php)(/.+)$; </p><p class="MsoNormal"> 56 fastcgi_intercept_errors on;</p><p class="MsoNormal"> 57 fastcgi_read_timeout 300;</p><p class="MsoNormal"> 58 include fastcgi_params;</p><p class="MsoNormal"> 59 }</p><p class="MsoNormal"> 60</p><p class="MsoNormal"> 61 # deny access to .htaccess files, if Apache's document root</p><p class="MsoNormal"> 62 # concurs with nginx's one</p><p class="MsoNormal"> 63 location ~ /\.ht {</p><p class="MsoNormal"> 64 deny all;</p><p class="MsoNormal"> 65 }</p><p class="MsoNormal"> 66 }</p><p class="MsoNormal"> </p><p class="MsoNormal"> </p><p class="MsoNormal"> </p><p class="MsoNormal"> </p><p class="MsoNormal"> </p><p class="MsoNormal">--------------------<br>-Best<br>Hemanth</p><p class="MsoNormal"> </p></div></div><p class="MsoNormal"><br>______________________________<wbr>_________________<br>nginx mailing list<br><a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br><a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a></p></blockquote></div><p class="MsoNormal"><br><br clear="all"></p><div><p class="MsoNormal"> </p></div><p class="MsoNormal">-- </p><div><div><div><p class="MsoNormal"><b>Anoop P Alias</b> </p></div></div></div></div><p class="MsoNormal"> </p><p class="MsoNormal"> </p></div></div></div></div></blockquote></div><p class="MsoNormal"><br><br clear="all"></p><div><p class="MsoNormal"><u></u> <u></u></p></div><p class="MsoNormal">-- </p><div><div><div><p class="MsoNormal"><b>Anoop P Alias</b> </p></div></div></div></div><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p></div></div></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><b>Anoop P Alias</b> <div><br></div></div></div></div>
</div>