server {
        listen 8080 default_server ssl;
        server_name  _;
        root         /var/www/html/devportal-v2/developer_portal/web;
        index        index.php index.html index.htm;
        ssl_certificate /etc/ssl/fullchain1.pem; ssl_certificate_key /etc/ssl/privkey1.pem;
    if ($scheme = http) { return 301 https://$server_name$request_uri; }
    ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
    ssl_prefer_server_ciphers on;
    ssl_dhparam /etc/ssl/dhparam.pem;
    # HSTS (ngx_http_headers_module is required) (63072000 seconds)
    add_header Strict-Transport-Security "max-age=63072000" always;
    #OCSP stapling
    ssl_stapling on;
    ssl_stapling_verify on;
    client_max_body_size 100M;

        # Load configuration files for the default server block.
        include /etc/nginx/default.d/*.conf;


         location / {
            index index.php;
            add_header 'Access-Control-Allow-Origin' '*' always;
    # This is cool because no php is touched for static content
            try_files $uri $uri/ @rewrite;
            expires max;
        }

        location @rewrite {
         # Some modules enforce no slash (/) at the end of the URL
         # Else this rewrite block wouldn&#39;t be needed (GlobalRedirect)
            rewrite ^/(.*)$ /index.php?q=$1;
        }


        location ~ \.php$ {
            #try_files $uri =404;
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass unix:/run/php-fpm/www.sock;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include fastcgi_params;
      }

        error_page 404 /404.html;
            location = /40x.html {
        }

        error_page 500 502 503 504 /50x.html;
            location = /50x.html {
        }
    }

