Skip to content

Instantly share code, notes, and snippets.

@jesseschutt
Last active August 29, 2015 14:07
Show Gist options
  • Save jesseschutt/5f192fefaf87027df5c4 to your computer and use it in GitHub Desktop.
Save jesseschutt/5f192fefaf87027df5c4 to your computer and use it in GitHub Desktop.
Statamic on Homestead
server {
listen 80;
server_name www.example.com;
root /home/forge/example.com/public;
# FORGE SSL (DO NOT REMOVE!)
# ssl on;
# ssl_certificate;
# ssl_certificate_key;
index index.html index.htm index.php;
charset utf-8;
location ~* ^/_config {
deny all;
return 404;
}
location ~ /(_app|_config|_content|/layouts/) {
deny all;
return 404;
}
location ~ /.(yml|yaml|html) {
deny all;
}
location / {
rewrite ^/admin.php.*$ /admin.php;
try_files $uri $uri/ /index.php?$query_string;
}
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 /var/log/nginx/example.com-error.log error;
error_page 404 /index.php;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment