Config:Nginx:CodeIgniter

出自 Chan
前往: 導覽搜尋

conf

server {
    listen 80;
    root /var/www/codeigniter/;
    server_name  ci.app;
    index index.php index.html index.htm;
    error_log /var/log/codeigniter-error.log;

    location / {
        try_files $uri $uri/ /index.php;
    }

    location ~ \.php$ {
        fastcgi_pass  unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        fastcgi_split_path_info ^(.+\.php)(.*)$;
        include fastcgi_params;
        fastcgi_param HTTPS off;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
}