Created
March 8, 2017 18:26
-
-
Save expertjtb/13baa8d002cc42d9dd09f36deca23f01 to your computer and use it in GitHub Desktop.
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
## | |
# You should look at the following URLs in order to grasp a solid understanding | |
# of Nginx configuration files in order to fully unleash the power of Nginx. | |
# http://wiki.nginx.org/Pitfalls | |
# http://wiki.nginx.org/QuickStart | |
# http://wiki.nginx.org/Configuration | |
# | |
# Generally, you will want to move this file somewhere, and start with a clean | |
# file but keep this around for reference. Or just disable in sites-enabled. | |
# | |
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples. | |
## | |
server { | |
listen 8080; #C9 limits public ports. Only 8080 available | |
# server_name *.c9users.io; | |
server_name mautix-expertjtb.c9users.io; | |
# Home directoy, our server workspace | |
root /home/ubuntu/workspace; | |
# Look for index files in this order | |
index index.html index.htm index.php; | |
# You know, weird things always happening around symbols. | |
charset utf-8; | |
# Allow to upload more buffer | |
client_max_body_size 32M; | |
# Only one location is needed. The root. | |
location / { | |
# Default: Parameters at the end for rewriting. | |
# try_files $uri $uri/ /index.php?$query_string; | |
# Query modified for Drupal, althought should work without it. | |
# this try_files (Note "q" parameter) | |
# try_files $uri $uri/ /index.php?q=$uri&$args; | |
# Yet another default | |
try_files $uri $uri/ /index.php$is_args$args; | |
} | |
location = /favicon.ico { access_log off; log_not_found off; } | |
location = /robots.txt { access_log off; log_not_found off; } | |
access_log off; | |
error_log /home/ubuntu/error.log notice; | |
error_page 404 /index.php; | |
# PHP-FPM setup. | |
location ~ \.php$ { | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
# We love socks, no callbacks. | |
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param SCRIPT_NAME $fastcgi_script_name; | |
include fastcgi_params; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment