Skip to content

Instantly share code, notes, and snippets.

@rehmatworks
Created July 14, 2021 19:01
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 rehmatworks/0f9410862bd3ee423753df112a3d55f5 to your computer and use it in GitHub Desktop.
Save rehmatworks/0f9410862bd3ee423753df112a3d55f5 to your computer and use it in GitHub Desktop.
NGINX vhost file.
server {
listen 80;
server_name example.com;
root /home/user/sites/example;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment