Skip to content

Instantly share code, notes, and snippets.

@gieart87
Last active June 25, 2020 09:34
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gieart87/534c978bc7842b7dbd2a8083c368d42b to your computer and use it in GitHub Desktop.
Save gieart87/534c978bc7842b7dbd2a8083c368d42b to your computer and use it in GitHub Desktop.
Nginx Virtual Host Config for CodeIgniter 3.x in Mac / OSX Sierra
server {
listen 80;
server_name localhost;
root /Users/user/html/codeigniter/;
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_buffers 256 128k;
fastcgi_connect_timeout 300s;
fastcgi_send_timeout 300s;
fastcgi_read_timeout 300s;
include fastcgi_params;
}
error_page 404 /404.html;
error_page 403 /403.html;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment