Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

136
Vistas
phpinfo only displays a blank page on nginx

I'm currently learning Nginx, and trying to get phpinfo to be displayed. But it only displays a blank page like this. phpinfo blank

The below is what I have made sure / tried so far.

  • php socket is at the correct location
find / -name *fpm.sock
/run/php/php7.4-fpm.sock
  • php file has been created properly
root@nginx-fundamentals:/sites/demo# cat info.php
<?php phpinfo(); ?>
  • the user for nginx process is the same as the one for php
root@nginx-fundamentals:~# ps aux | grep nginx
root        1056  0.0  0.3   8720  3212 ?        Ss   Jun20   0:00 nginx: master process /usr/sbin/nginx
www-data  104677  0.0  0.3   9140  3684 ?        S    Jul06   0:00 nginx: worker process
root      112008  0.0  0.2   8160  2496 pts/0    S+   04:03   0:00 grep --color=auto nginx
root@nginx-fundamentals:~# ps aux | grep php
root       11018  0.0  1.0 195484 10496 ?        Ss   Jun21   1:52 php-fpm: master process (/etc/php/7.4/fpm/php-fpm.conf)
www-data   11020  0.0  0.4 195872  4756 ?        S    Jun21   0:00 php-fpm: pool www
www-data   11021  0.0  0.4 195872  4756 ?        S    Jun21   0:00 php-fpm: pool www
root      112010  0.0  0.0   8160   736 pts/0    S+   04:03   0:00 grep --color=auto php
  • the content of the conf file should be fine
root@nginx-fundamentals:/etc/nginx# cat nginx.conf
user www-data;
events {}
 
http {
    include mime.types;
    server {
 
      listen 80;
      server_name XX.XXX.XXX.117;
 
      root /sites/demo;
      index index.php index.html;
 
      location / {
        try_files $uri $uri/ =404;
      }
 
      location ~\.phps$ {
        # Pass php requests to the php-fps service (fastcgi)
        include fastcgi.conf;
        fastcgi_pass unix:/run/php/php7.4-fpm.sock;
      }
    }
}
  • When the path is not specified, it displays the default page. Default page

What am I doing wrong? What else should I investigate?

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda