<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:2 11 5 4 2 2 2 2 2 4;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Segoe UI";
panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style></head><body lang=EN-US link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Hi Anoop,</p><p class=MsoNormal>Let me look into the php config and see anything comes up</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>--------------------<br>-Best<br>Hemanth</p><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;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">Anoop Alias</a><br><b>Sent: </b>Friday, November 25, 2016 5:44 PM<br><b>To: </b><a href="mailto:hemanthnews@yahoo.com">hemanthnews@yahoo.com</a><br><b>Cc: </b><a href="mailto:nginx@nginx.org">Nginx</a><br><b>Subject: </b>Re: Trouble in configuring fir REST support</p></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>yes nothing to do with the problem at hand.</p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>You can also try to execute the index.php using the php (cli) and see if if there is an error etc.</p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>probably turn on display_error in php.ini .</p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Its strange nginx is not logging any errors.</p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Since the phpinfo page is working..this is more or less a problem with php than nginx I think.</p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Good luck.</p></div></div><div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>On Fri, Nov 25, 2016 at 5:35 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>Phpinfo() is working fine … is there something to look for specifically?</p><p class=MsoNormal> </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> </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> </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: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><p class=MsoNormal><br><b>Subject: </b>Re: Trouble in configuring fir REST support</p></div></div></div><div><div><p class=MsoNormal> </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> </p></div><div><p class=MsoNormal>Also while not related to the error Try </p></div><div><p class=MsoNormal> </p></div><div><p class=MsoNormal>root /opt/riversilica/pixflex/install/app_server/pixflex/public; </p></div><div><p class=MsoNormal> </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> </p></div><div><p class=MsoNormal> </p></div><div><p class=MsoNormal> </p></div></div><div><p class=MsoNormal> </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-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'><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_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-Credentials' 'true';</p><p class=MsoNormal> 23 add_header 'Access-Control-Allow-Headers' 'Content-Type,accept,x-wsse,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/install/app_server/pixflex/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/install/app_server/pixflex/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_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>_______________________________________________<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/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> </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><o:p> </o:p></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><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>