-
-
Save jamieshepherd/50419bb148a4f43e8266 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
server { | |
# Port to listen | |
listen 80; | |
# Root directory | |
# We're assuming laravel here, if not just /vagrant | |
root /web/paragongg/public; | |
# Set index to php file | |
index index.php; | |
# Make site accessible from http://localhost/ | |
server_name paragon.gg *.paragon.gg; | |
# Location | |
location / { | |
try_files $uri/ /index.php?$query_string; | |
} | |
# Remove trailing slash | |
if (!-d $request_filename){ | |
rewrite ^/(.+)/$ /$1 permanent; | |
} | |
# Configure PHP FPM | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
#fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
} | |
# Remove htaccess | |
location ~ /\.ht { | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment