Created
August 24, 2016 16:07
-
-
Save hernandev/cecc44dd219b80ac4e18c3ef2b2cb730 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
# HTTP Application | |
server { | |
# Application Path | |
root /path/to/app/public/path; | |
# Index Application File | |
index index.php; | |
# Listen to hosts | |
server_name app.com www.app.com *.app.com; | |
# Enable IPv4 | |
listen 80; | |
# Enable IPv6 | |
listen [::]:80; | |
# URL Rewrite Rules | |
location / { | |
try_files $uri $uri/ /index.php$is_args$args; | |
} | |
# PHP Backend Config | |
location ~ \.php$ { | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass unix:/run/php/php7.0-fpm-myapp.sock; | |
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