server {
    listen 80;
    index index.php;
    server_name podravka.hr.dev;
    root /home/dado/Development/podravka.hr/app/public;

    location /framework/javascript {
        alias /home/dado/Development/podravka.hr/framework/asset/javascript/lib/;
    }
    location /framework/style {
        alias /home/dado/Development/podravka.hr/framework/asset/styles/;
    }

    try_files $uri $uri/ /index.php?$query_string;
    
    location ~ \.php$ {
        root           html;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME /home/dado/Development/podravka.hr/app/public$fastcgi_script_name;
        fastcgi_param  APPLICATION_ENV mydevelopment;
        include        fastcgi_params;
    }
}

server {
    listen 443 ssl;

    ssl_certificate     ssl/www.podravka.hr.crt;
    ssl_certificate_key ssl/www.podravka.hr.key;
    ssl_protocols       SSLv3 TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers         HIGH:!aNULL:!MD5;

    index index.php;
    server_name podravka.hr.dev;
    root /home/dado/Development/podravka.hr/app/public;

    location /framework/javascript {
        alias /home/dado/Development/podravka.hr/framework/asset/javascript/lib/;
    }
    location /framework/style {
        alias /home/dado/Development/podravka.hr/framework/asset/styles/;
    }

    try_files $uri $uri/ /index.php?$query_string;
    
    location ~ \.php$ {
        root           html;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME /home/dado/Development/podravka.hr/app/public$fastcgi_script_name;
        fastcgi_param  APPLICATION_ENV mydevelopment;
        include        fastcgi_params;
    }
}