Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 0.0.0.0:80; # change those according to your preferences
- server_name localhost; # change those according to your preferences
- location / {
- root /var/lib/airtime/public;
- index index.php;
- # you can uncomment the 2 lines bellow in order to have additional security...
- # also don't forget to change the host variable in airtime's config from
- # localhost:80 to user:pass@localhost:80
- # or the method I did was to create 2nd vhost called localhost (using server_name in nginx's
- # config.
- # So I other words my airtime is available to anybody on 0.0.0.0:444 requiring basic auth.
- # But with the virtualhost - if you visit the site from the localmashine - http://localhost
- # as Airtime does - it doesn't require a password since for that virtual host I removed
- # the 2 lines you see bellow.
- # auth_basic "";
- # auth_basic_user_file /etc/nginx-htpasswd;
- # if file exists return it right away
- if (-f $request_filename) {
- break;
- }
- if (!-e $request_filename) {
- rewrite ^(.+)$ /index.php$1 last;
- break;
- }
- }
- # if the request starts with our frontcontroller (and when not always .php), pass it on to fastcgi
- location ~ ^/index.php
- {
- fastcgi_pass 127.0.0.1:6000; # I'm using port 6000 because in ls_config.liq
- # there is "intra-LS" set on port 9000 which
- # is actually the default for fastcgi as well
- fastcgi_param SCRIPT_FILENAME /var/lib/airtime/public$fastcgi_script_name;
- fastcgi_param PATH_INFO $fastcgi_script_name;
- include /usr/local/nginx/conf/fastcgi_params;
- }
- # if the file has extension of .php - pass it on to fastcgi
- location ~ \.php$
- {
- fastcgi_pass 127.0.0.1:6000;
- fastcgi_param SCRIPT_FILENAME /var/lib/airtime/public$fastcgi_script_name;
- fastcgi_param PATH_INFO $fastcgi_script_name;
- include /usr/local/nginx/conf/fastcgi_params;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement