I have the following config in my nginx's .conf file. I'm quite new to configuring web servers, so I'm facing some issues. Now if I understand correctly the first block redirects everything to https. The second block is the actual server config for example.com, while the third one redirects www.example.com to the second server block without the www. tag.

Now there's an exception, where I want to access a folder on the server without using https. So if I type <http://www.example.com/folder/page.php> then the site should not be redirected to either https, nor to plain example.com without the www. I tried adding

```
location /folder/page.php
{
    http://www.example.com/folder/page.php
} 

```

to all the server blocks, but none of them did the trick actually.

I'd really appreciate any advice on how to solve the issue. Thanks in advance!

```
server
{
    listen 80;
    listen [::]:80;
    return 301 https://$host$request_uri;
}

server
{
    listen 443 ssl;
    listen [::]:443 ssl;
    server_name example.com;

    root /data/web/example.com/web;

    location /phpmyadmin
    {
        root /usr/share;
        location ~ \.php$
        {
            include php.conf;
        }

        location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { 
            root /usr/share/; 
        } 
    }

    location /webftp
    {
        root /data/web;
        location ~ \.php$
        {
            include php.conf;
        }
    }
}

server
{
    listen 443 ssl;
    listen [::]:443 ssl;
    server_name www.example.com;
    return 301 $scheme://example.com$request_uri;
}

```