diff options
author | Camil Staps | 2015-05-20 17:52:14 +0200 |
---|---|---|
committer | Camil Staps | 2015-05-20 17:52:14 +0200 |
commit | 6027bfafb1a9fa0e865a8a4fe8109826e1519733 (patch) | |
tree | 7433e8c4da1aeac8b5c028bc41800e341286e745 | |
parent | added disabling CSRF to installation instructions (diff) |
nginx example config
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | docs/nginx.conf | 25 |
2 files changed, 29 insertions, 0 deletions
@@ -47,3 +47,7 @@ RESTful PHP API for Botleagues This disables the default CSRF middleware. After this, you should be good to go. Add configuration settings and the like as usual. + +# Nginx + +See `docs/nginx.conf`. diff --git a/docs/nginx.conf b/docs/nginx.conf new file mode 100644 index 0000000..47e3295 --- /dev/null +++ b/docs/nginx.conf @@ -0,0 +1,25 @@ +server { + listen 443 ssl; + + root /path-to-laravel-project; + index server.php; + + server_name api.domain.com; + + # You MUST have an SSL certificate as we're going to transmit passwords. + # Don't worry, for testing you can use a self-signed certificate. And you + # can always use a free certificate as well, if you don't mind. + ssl_certificate /etc/nginx/ssl/botleagues.crt; + ssl_certificate_key /etc/nginx/ssl/botleagues.key; + + location / { + try_files $uri $uri/ /server.php?$query_string; + } + + location ~ \.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_index index.php; + include fastcgi_params; + } +} |