How to configure Phalcon in the Nginx config file

Lorenzo Verri picture Lorenzo Verri · Jul 8, 2013 · Viewed 10.4k times · Source

I am trying to set up an NGINx server to work with Phalcon PHP Framework. So far I've been looking for help on the internet but I could not find anything...

My conf file is:

server {
#listen   80; ## listen for ipv4; this line is default and implied
#listen   [::]:80 default ipv6only=on; ## listen for ipv6

root /usr/share/nginx/www;
index index.php index.html index.htm;

# Make site accessible from http://localhost/
server_name localhost;

location / {
    # First attempt to serve request as file, then
    # as directory, then fall back to index.html
    try_files $uri $uri/ /index.html;
    # Uncomment to enable naxsi on this location
    # include /etc/nginx/naxsi.rules
}

location /doc/ {
    alias /usr/share/doc/;
    autoindex on;
    allow 127.0.0.1;
    deny all;
}

What should add to it in order to make Phalcon work? Thank you.

Answer

Iustinian picture Iustinian · Jul 8, 2013

This is the link to the official phalcon nginx configurations. http://docs.phalconphp.com/en/latest/reference/nginx.html