I use HTTPS and I only want a URL with HTTP with Nginx

0

I have a site set up on an Nginx server to force HTTPS for the whole site, but I need only one URL to be in HTTP only keeping the rest of the site on HTTPS.

The URL is exactly this:

  

link

I want it to be forced to stay in HTTP only type like this and hold:

  

link

My configuration file looks like this:

server {

    listen      80;
    listen [::]:80;
    server_name site.meudominio.com.br;
    return 301 https://site.meudominio.com.br$request_uri;
}

server {
    listen      443 ssl http2;
    listen [::]:443 ssl http2;
    server_name site.meudominio.com.br;

    ssl on;
    ssl_certificate     /etc/ssl/fullchain.pem;
    ssl_certificate_key /etc/ssl/privkey.pem;

    include snippets/ssl-params.conf;

    root /var/www/meudominio.com.br/site;

    index index.html index.htm index.php;

    charset utf-8;

    location / {
         try_files $uri @meudominio;
    }

    location @meudominio {
      rewrite ^/(.+)$ /index.php?_route_=$1 last;
    }

location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/run/php/php-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_intercept_errors off;
        fastcgi_buffer_size 16k;
        fastcgi_buffers 4 16k;
    }

    location ~ /\.ht {
        deny all;
    }
}
    
asked by anonymous 28.11.2016 / 23:32

0 answers