Skip to content

Instantly share code, notes, and snippets.

@tricarte
Last active January 30, 2023 17:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tricarte/903d5c18d5fb317beae1912e0b0f5dc7 to your computer and use it in GitHub Desktop.
Save tricarte/903d5c18d5fb317beae1912e0b0f5dc7 to your computer and use it in GitHub Desktop.
server {
listen 127.0.0.1:80;
server_name localhost;
root /var/www/localhost;
index index.php;
access_log off;
# pass PHP scripts to FastCGI server
location ~ \.php$ {
# This file also includes fastcgi.conf file from nginx root
include snippets/fastcgi-php.conf;
# With php-fpm (or other unix sockets):
# fastcgi_param PHP_ADMIN_VALUE open_basedir=$document_root;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
# With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment