nortmas
6/4/2015 - 7:55 AM

Nginx

server {
	listen 80;

        server_name admin.d8.loc;
        root /home/nortmas/www/d8.loc/web;
	index index.html index.php;

	location / {
                try_files $uri $uri/ /index.php?$args;
        }

        location ~ \.php$ {
                fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
                include fastcgi_params;
		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        }
}
server {
	listen 80;

        server_name d8.loc *.d8.loc;
        root /home/nortmas/www/d8.loc/frontend/dist;
	index index.html index.php;

	location / {
                try_files $uri $uri/ /index.php?;
        }

        location ~ \.php$ {
                fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
                include fastcgi_params;
		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        }
}
server {
	listen 8080;
	listen 443 ssl;
        server_name m60.loc;

        ssl_certificate /etc/ssl/server.crt;
        ssl_certificate_key /etc/ssl/server.key;

        root /home/nortmas/www/m60.loc;
        index index.php index.html index.htm;
        location / {
                fastcgi_param   HTTPS              on;
                try_files $uri $uri/ /index.php?$args;
        }
        error_page 404 /404.html;
        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
              root /usr/share/nginx/html/drupal;
        }
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9$
        location ~ \.php$ {
                #fastcgi_pass 127.0.0.1:9000;
                # With php5-fpm:
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                include fastcgi_params;
                fastcgi_read_timeout 600;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        }
}
server {
        listen   8080;
        server_name bmi.loc m.bmi.loc;
        root /home/nortmas/www/bmi.loc/docroot;
        index index.php index.html index.htm;
        location / {
                try_files $uri $uri/ /index.php?q=$uri&$args;
        }
        error_page 404 /404.html;
        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
              root /usr/share/nginx/html/drupal;
        }
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9$
        location ~ \.php$ {
                #fastcgi_pass 127.0.0.1:9000;
                # With php5-fpm:
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                include fastcgi_params;
		fastcgi_read_timeout 600;

        }
	### Support for http://drupal.org/project/js module.
	location ^~ /js/ {
	  location ~* ^/js/ {
	    rewrite ^/(.*)$ /js.php?q=$1 last;
	  }
	}
}