Last active
November 14, 2016 15:53
-
-
Save geekish/7c8963e41f1b1c20f062 to your computer and use it in GitHub Desktop.
Pagekit Nginx conf
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 { | |
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; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@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.