How to access certain files via http?


Hi I am using EE + Redis + Subdomain Multisites stack at the moment.

But I need files such as txt and php files to be accessed by http.

I am only able to access via HTTPS after setting the SSL provided by EE.

What should i do? Please help me.

Here is my site configuration code in site-available when i edit.

server {
listen 80;
ssl off;
root /var/www/;
index index.php
add_header  Strict-Transport-Security "max-age=0;";
location = /seo2.txt{}
location = /seo1.txt{}
location = /ajaxnaver.php {
           try_files $uri =404;
           fastcgi_split_path_info ^(.+\.php)(/.+)$;
           fastcgi_pass unix:/run/php/php7.0-fpm.sock;
           fastcgi_index index.php;
           fastcgi_read_timeout 180;
           fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
           include fastcgi_params;

   location /{
        return 301 https://$host$request_uri;

server {
listen 443 ssl http2;
root /var/www/;

If you have set a redirection from http to https it’s not possible, especially with HSTS header enabled which disallow web browser to use http

additionally header Strict-Transport-Security should not be set under the http server block.