Skip to content

Instantly share code, notes, and snippets.

@dhanar98
Last active December 11, 2021 17:24
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 dhanar98/dd0c3a420411b8b810395b3eb49d9b9e to your computer and use it in GitHub Desktop.
Save dhanar98/dd0c3a420411b8b810395b3eb49d9b9e to your computer and use it in GitHub Desktop.
Phalcon Configuration for Nginx Server
server {
listen 80;
server_name localhost;
root /var/www/phalcon/public; #root_path
index index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?_url=$uri&$args;
}
location ~ \.php {
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
fastcgi_index /index.php;
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment