<div dir="ltr">What does the error log say?</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 25, 2016 at 5:03 PM, Hemanthnews via nginx <span dir="ltr"><<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</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"><div class="m_5242509321493394525WordSection1"><p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">Hi,<u></u><u></u></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 <u></u><u></u></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) <u></u><u></u></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<u></u><u></u></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 <u></u><u></u></span></p><p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;font-family:"Helvetica",sans-serif;color:black">ZF2 <u></u><u></u></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"><u></u> <u></u></p><p class="MsoNormal">Nginx configured on port-80 and apache on port-9080</p><p class="MsoNormal"><u></u> <u></u></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” <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Segoe UI",sans-serif;color:dimgray;text-transform:uppercase;background:#f7f7f7"><u></u> <u></u></span></p><p class="MsoNormal"><u></u> <u></u></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"><u></u> <u></u></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"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></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></div><br>______________________________<wbr>_________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a><br></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>