Skip to content

Instantly share code, notes, and snippets.

@jamieshepherd
Last active January 20, 2016 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamieshepherd/50419bb148a4f43e8266 to your computer and use it in GitHub Desktop.
Save jamieshepherd/50419bb148a4f43e8266 to your computer and use it in GitHub Desktop.
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