summarylogtreecommitdiffstats
path: root/filebin-nginx.conf
diff options
context:
space:
mode:
authorSimon Hanna2015-06-08 15:16:43 +0200
committerSimon Hanna2015-06-08 15:16:43 +0200
commita9aeea5b3b4d92bc6afea9826c9261afff3167ec (patch)
tree276008eacc6a17dae0f77d09ab84be242bf00857 /filebin-nginx.conf
downloadaur-a9aeea5b3b4d92bc6afea9826c9261afff3167ec.tar.gz
Import filebin v 0.9.2
Diffstat (limited to 'filebin-nginx.conf')
-rw-r--r--filebin-nginx.conf64
1 files changed, 64 insertions, 0 deletions
diff --git a/filebin-nginx.conf b/filebin-nginx.conf
new file mode 100644
index 000000000000..8333a193b25f
--- /dev/null
+++ b/filebin-nginx.conf
@@ -0,0 +1,64 @@
+## http server redirecting to https
+server {
+ listen 80;
+ server_name example.com;
+
+ return 301 https://$server_name$request_uri;
+}
+
+## sample http server, if no https is being used, if you use this comment the https server section
+#server {
+# listen 80;
+# server_name example.com;
+
+
+# root /usr/share/webapps/filebin;
+# index index.php index.html index.htm;
+
+# location / {
+# # First attempt to serve request as file, then
+# # as directory, then fall back to displaying a 404.
+# try_files $uri $uri/ /index.php /index.html;
+# }
+# location ~ ^(.+\.php)(.*)$ {
+# try_files $fastcgi_script_name =404;
+# fastcgi_split_path_info ^(.+\.php)(.*)$;
+# fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
+# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+# fastcgi_param PATH_INFO $fastcgi_path_info;
+# include /etc/nginx/fastcgi_params;
+# }
+#}
+
+## Config for server secured with https
+server {
+ listen 443;
+
+ root /usr/share/webapps/filebin;
+ index index.php index.html index.htm;
+
+ server_name example.com;
+
+
+ ssl on;
+ ssl_certificate certificate.crt;
+ ssl_certificate_key private-key.key;
+ ssl_session_timeout 5m;
+ ssl_ciphers 'AES128+EECDH:AES128+EDH';
+ ssl_prefer_server_ciphers on;
+
+ location / {
+ # First attempt to serve request as file, then
+ # as directory, then fall back to displaying a 404.
+ try_files $uri $uri/ /index.php /index.html;
+ }
+ location ~ ^(.+\.php)(.*)$ {
+ try_files $fastcgi_script_name =404;
+ fastcgi_split_path_info ^(.+\.php)(.*)$;
+ fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ include /etc/nginx/fastcgi_params;
+ }
+}
+