Nginx web server starts to build local projects

Nginx web server starts to build local projects

Foreword

Installation widnow.s version of nginx, first download the latest version of nginx, version 9.19 is (nginx / Windows-1.15.3) nginx / Windows-1.15.3
Once downloaded, extract to a directory to switch to nginx-1.15.3 directory, then run nginx.exe (double-click)
can also use the command-line tool

 

Modify the port

nginx default port is a 80-port, modify the port can be modified conf \ nginx.conf in

0 #keepalive_timeout; 
    keepalive_timeout 65; 

    #gzip ON; 

    Server { 
        the listen 80 // 8090; 80 // listening port, the port may be modified to any unoccupied, such as 8090 
        server_name localhost; 

        #charset KOI8-R & lt; 

        #access_log logs / host.access.log main; 
default directory in the home directory of the installation nginx html subdirectory 
        LOCATION / { 
            the root html; 
            index index.html index.htm; 
        }

  

Startup project

In the following html directory of nginx directory, delete html files in the directory change. Add your own html file

Guess you like

Origin www.cnblogs.com/lan-cheng/p/12127571.html
Recommended