Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Trying nginx+php+mysql on Mac OS. Failing :-(

$
0
0
Dear friends,
I installed mysql, nginx and php 7 on my Mac OS Sierra and despite working for several hours I am not quite managing to get the phpinfo to work (it gets downloaded).

As far as I understand php-fm is running

Bob@Imac27RJA:~$ lsof -Pni4 | grep LISTEN | grep php
php-fpm 4498 Bob 8u IPv4 0xdfb09ce80e670d85 0t0 TCP 127.0.0.1:9000 (LISTEN)
php-fpm 4499 Bob 0u IPv4 0xdfb09ce80e670d85 0t0 TCP 127.0.0.1:9000 (LISTEN)
php-fpm 4500 Bob 0u IPv4 0xdfb09ce80e670d85 0t0 TCP 127.0.0.1:9000 (LISTEN)

and php is v7:
Bob@Imac27RJA:~/Hosts/paperness.it$ php -v
PHP 7.0.20 (cli) (built: Jun 23 2017 07:46:30) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.20, Copyright (c) 1999-2017, by Zend Technologies
with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans

and nginx too is up and running:

Bob@Imac27RJA:~$ lsof -Pni4 | grep LISTEN | grep nginx
nginx 4740 Bob 6u IPv4 0xdfb09ce82a29ba5d 0t0 TCP *:80 (LISTEN)
nginx 4740 Bob 7u IPv4 0xdfb09ce8168cb67d 0t0 TCP *:443 (LISTEN)
... several similar lines omitted ...

my website is here:

Bob@Imac27RJA:~/Hosts/paperness.it$ ls -l
total 16
-rw-r--r-- 1 Bob staff 600B Jul 7 16:00 index.html
-rw-r--r-- 1 Bob staff 19B Jul 7 17:05 index.php

and the content of the index.php file is:

Bob@Imac27RJA:~/Hosts/paperness.it$ cat index.php
<?php phpinfo(); ?>

while the index.html file gets loaded as expected, the index.php file is only downloaded and not interpreted by PHP

Bob@Imac27RJA:~$ nginx -v
nginx version: nginx/1.12.0

here follows attached the nginx.conf file. Please help to identify my beginner's mistake ! Thank you very much in advance

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>