Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
dockerfiles/nginx-php/build/default
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
42 lines (33 sloc)
1.17 KB
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
server { | |
listen 80; | |
root /var/www/public; | |
index index.html index.htm index.php; | |
# Make site accessible from http://set-ip-address.xip.io | |
server_name localhost; | |
access_log /var/log/nginx/localhost.com-access.log; | |
error_log /var/log/nginx/localhost.com-error.log error; | |
charset utf-8; | |
location / { | |
try_files $uri $uri/ /index.html /index.php?$query_string; | |
} | |
location = /favicon.ico { log_not_found off; access_log off; } | |
location = /robots.txt { access_log off; log_not_found off; } | |
error_page 404 /index.php; | |
# pass the PHP scripts to php5-fpm | |
# Note: \.php$ is susceptible to file upload attacks | |
# Consider using: "location ~ ^/(index|app|app_dev|config)\.php(/|$) {" | |
location ~ \.php$ { | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
# With php5-fpm: | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
include fastcgi.conf; | |
# fastcgi_param LARA_ENV local; # Environment variable for Laravel | |
fastcgi_param HTTPS off; | |
} | |
# Deny .htaccess file access | |
location ~ /\.ht { | |
deny all; | |
} | |
} |