Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Nginx Htaccess

http://docs.phalconphp.com/en/latest/reference/tutorial.html#beautiful-urls

i was looking for this, but im using nginx webserver. what can i use ? and for use this and INVO tutorails, should I do one of thouse ; http://docs.phalconphp.com/en/latest/reference/nginx.html



3.6k

works great. thx



3.6k
edited Mar '14

@ahmeterol: Nginx does NOT support htaccess...

This is what i use, for nginx:

server {
  listen                192.168.56.144:80;

  server_name           phalcon.es www.phalcon.es;
  root /var/www/phalcon.es/public;
    index  index.php index.html index.htm;

  access_log            /var/log/nginx/phalcon.es.access.log;
  error_log             /var/log/nginx/phalcon.es.error.log;

  location / {
    root  /var/www/phalcon.es/public;
    try_files $request_uri $request_uri/ /index.php$is_args$args;
    index  index.html index.htm index.php;
    gzip on;
  }
  location ~* \.(ico|3gp|gif|jpg|cur|svg|jpeg|png|wmv|avi|asf|asx|mpg|mpeg|mp4|woff|pls|mp3|mid|wav|swf|flv|js|html|htm|txt|css|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso|htc)(\?[0-9]+)?$ {
    access_log off;
    add_header Pragma "public";
    error_log off;
    expires max;
    log_not_found off;
  }

  location ~* \.php$ {
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    try_files $uri =404;
    include /etc/nginx/fastcgi_params;
    fastcgi_pass unix:/var/run/php5-fpm.sock;

    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  }

include /etc/nginx/mime.types;
}