Last active
July 7, 2022 03:05
-
-
Save williamn/f4d7a837808419407f86 to your computer and use it in GitHub Desktop.
CodeIgniter on nginx using PHP FPM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream php5438 { | |
server 127.0.0.1:5438; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name codeigniter.local; | |
root /var/www/CodeIgniter-2.2.1; | |
autoindex on; | |
index index.html index.htm index.php; | |
access_log /var/log/nginx/codeigniter.local.access.log combined; | |
error_log /var/log/nginx/codeigniter.local.error.log; | |
location / { | |
try_files $uri $uri/ /index.php; | |
location = /index.php { | |
fastcgi_pass php5438; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
} | |
location ~ \.php$ { | |
return 444; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment