Wednesday, 23 November 2016

Instalasi Bank Soal di NGINX

Status : Draft


Konfigurasi NGINX


server {
        #listen 80 default_server;
        #listen 443 ssl;

        server_name banksoal.np;
        #ssl_certificate /etc/nginx/ssl/nginx.crt;
        #ssl_certificate_key /etc/nginx/ssl/nginx.key;

        root /apps/banksoal/application/webroot;

        access_log /var/log/nginx/banksoal/access.log;
        error_log /var/log/nginx/banksoal/error.log;

        fastcgi_read_timeout 30000s;
        client_max_body_size 300M;   # adjust to taste


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

        location ~ [^/]\.php(/|$) {
                fastcgi_split_path_info ^(.+?\.php)(/.*)$;
                if (!-f $document_root$fastcgi_script_name) {
                        return 404;
                }
                include fastcgi_params;
                fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param   PATH_INFO               $fastcgi_path_info;
                fastcgi_param   KOHANA_ENV development;
                fastcgi_pass fpm;
        }
}

/etc/nginx/conf.d/fpm.conf

upstream fpm {
        server unix:/run/php/php7.0-fpm.sock;
}

 /etc/php/7.0/fpm/php.ini

upload_max_filesize = 500M
post_max_size = 500M

No comments:

Post a Comment