Last active
August 29, 2015 13:56
-
-
Save ruo91/8867315 to your computer and use it in GitHub Desktop.
nginx.conf example1
This file contains 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
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