Last active
November 12, 2015 14:08
-
-
Save remcotolsma/8b0a8ea85e59baa5f5b1 to your computer and use it in GitHub Desktop.
nginx.conf
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 *.dev; | |
root /Users/remco/Websites/$host/; | |
access_log /usr/local/etc/nginx/logs/default.access.log main; | |
location / { | |
include /Users/remco/Websites/php-fpm.conf; | |
try_files $uri $uri/ /index.php?$args; | |
} | |
error_page 404 /404.html; | |
error_page 403 /403.html; | |
} |
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
worker_processes 1; | |
error_log /usr/local/etc/nginx/logs/error.log debug; | |
events { | |
worker_connections 256; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | |
'$status $body_bytes_sent "$http_referer" ' | |
'"$http_user_agent" "$http_x_forwarded_for"'; | |
access_log /usr/local/etc/nginx/logs/access.log main; | |
sendfile on; | |
keepalive_timeout 65; | |
index index.html index.php; | |
# Upstream to abstract backend connection(s) for PHP. | |
# upstream php { | |
# #this should match value of "listen" directive in php-fpm pool | |
# server unix:/tmp/php-fpm.sock; | |
# server 127.0.0.1:9000; | |
# } | |
client_max_body_size 64m; | |
include /Users/remco/Websites/nginx.conf; | |
} |
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
location ~ \.php$ { | |
try_files $uri = 404; | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.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