Config nginx to read local index.html and return to clients

 


http {

    include       mime.types;

    default_type  application/octet-stream;



    #access_log  logs/access.log  main;


    sendfile        on;

    #tcp_nopush     on;


    #keepalive_timeout  0;

    keepalive_timeout  65;


    #gzip  on;


    server {

        listen       80 default_server;

        server_name  _;


        #charset koi8-r;


        #access_log  logs/host.access.log  main;


        location  ~ \.(html|css|js)(.*)$ {

            root /home/www/html;

            index  index.html index.htm;

        }

     }

}

Comments

Popular posts from this blog

Fixing the DeepSpeed Import Error While Fine-Tuning the Qwen Model

Amazon Linux 2023 - User data configuration for launch templates to connect to the EKS cluster

How to create ISM policy and rotate logs in opensearch