Skip to content

Instantly share code, notes, and snippets.

@rcdevgames
Created April 24, 2020 03:53
Show Gist options
  • Save rcdevgames/77dc7ac35705e72aa1fa2c382ba27776 to your computer and use it in GitHub Desktop.
Save rcdevgames/77dc7ac35705e72aa1fa2c382ba27776 to your computer and use it in GitHub Desktop.
nginx codeigniter config
server {
server_name kawan.dev 139.180.210.169;
root /var/www/html/ci-pdam;
# root /var/www/html/;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php;
}
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
expires 15d;
}
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/html/ci-pdam/index.php;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment