Skip to content

Instantly share code, notes, and snippets.

@geekish
Last active November 14, 2016 15:53
Show Gist options
  • Save geekish/7c8963e41f1b1c20f062 to your computer and use it in GitHub Desktop.
Save geekish/7c8963e41f1b1c20f062 to your computer and use it in GitHub Desktop.
Pagekit Nginx conf
server {
listen 80;
server_name pagekit.dev ~^pagekit\.(.*)\.xip\.io;
root /home/vagrant/www/pagekit;
index index.php;
access_log /home/vagrant/log/pagekit-access.log;
error_log /home/vagrant/log/pagekit-error.log;
location ~ /\. {
deny all;
}
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt { allow all; log_not_found off; access_log off; }
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ .php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
fastcgi_param HTTP_MOD_REWRITE On;
}
}
@geekish
Copy link
Author

geekish commented Nov 14, 2016

@jarvan4dev Sorry I did not see this sooner. I do not use Pagekit, but I updated the gist with the hack needed to make Pagekit think Apache's HTTP_MOD_REWRITE is on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment