Skip to content

Instantly share code, notes, and snippets.

@ruo91
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ruo91/8867315 to your computer and use it in GitHub Desktop.
Save ruo91/8867315 to your computer and use it in GitHub Desktop.
nginx.conf example1
worker_processes 4;
events {
worker_connections 1024;
use epoll;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
gzip on;
# localhost
server {
listen 80;
server_name localhost;
root /usr/local/nginx/html;
index index.php index.html;
# Logs
access_log logs/localhost-access.log;
error_log logs/localhost-error.log;
# php-fpm
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_hide_header X-Powered-By;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment