From ca82abeff1cacf6da87429373e91e847d56854a7 Mon Sep 17 00:00:00 2001 From: james Date: Fri, 16 Dec 2011 10:55:08 -0500 Subject: [PATCH] CC-3199: Include NGINX scripts -- community contribution - vhost file is added --- install_full/nginx/airtime-vhost | 56 ++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 install_full/nginx/airtime-vhost diff --git a/install_full/nginx/airtime-vhost b/install_full/nginx/airtime-vhost new file mode 100644 index 000000000..069bf970a --- /dev/null +++ b/install_full/nginx/airtime-vhost @@ -0,0 +1,56 @@ +# This file is contributed by Eugene MechanisM +# Link to the post: +# http://forum.sourcefabric.org/discussion/13563/first-step-to-run-airtime-via-nginx-based-on-airtime-2.0-beta-files + +upstream php5-fpm { + ip_hash; + server unix:/var/run/airtime.php.sock; +} +server { + listen 80; + server_name airtime; #change to your host + include mime.types; + root /usr/share/airtime/public; + access_log /var/log/airtime.access.log; + error_log /var/log/airtime.error.log; + index index.php; + include fastcgi_params; + client_max_body_size 1G; + + location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm)$ { + expires max; + access_log off; + add_header Pragma public; + add_header Cache-Control "public, must-revalidate, proxy-revalidate"; + } + location / { + if (-e $request_filename){ + set $rule_0 1; + } + if ($request_filename ~ "-l"){ + set $rule_0 1; + } + if (-d $request_filename){ + set $rule_0 1; + } + rewrite ^/.*$ /index.php last; + try_files $uri $uri/ index.php; + + } + location ~ \.php$ { + include fastcgi_params; + fastcgi_pass php5-fpm; + } + location = /favicon.ico { + log_not_found off; + access_log off; + } + location = /robots.txt { + allow all; + log_not_found off; + access_log off; + } + location ~ /\.ht { + deny all; + } +}