step
Practical operationPut the published static web pages into the specified folder: Change the nginx configuration file: The nginx.conf configuration content is as follows: #user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { gzip on; #Static file server { listen 8080; server_name localhost; location / { root D:/resources/statichtmls; } } #html file server { listen 8080; server_name 127.0.0.1 localhost; location / { root D:/resources/statichtmls; index index.html index.htm; } } } Start nginx: Check whether the release is successful If it fails, please check the port number or other configurations, and whether the static file is correct. Shutdown nginxAfter the test is completed, if you do not use it, remember to close nginx The next time I enter the system, I cannot log in, which means nginx is closed. This is the end of this article about how to publish static resources with nginx. For more information about how to publish static resources with nginx, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: WeChat applet development form validation WxValidate usage
>>: 4 ways to avoid duplicate insertion of data in Mysql
version: centos==7.2 jdk==1.8 confluence==6.15.4 ...
Table of contents 1. Introduction 2. Entry mode o...
Today we are going to make origami airplanes (the...
Today's campus recruitment written test requi...
CentOS 8 changed the software package installatio...
Table of contents 1. Import files 2. HTML page 3....
In the previous article, I introduced the basic k...
1. Command Introduction The stat command is used ...
1. The difference between TEXT and BLOB The only ...
In the previous article, we have implemented loca...
[Problem description] Our production environment ...
Table of contents 1. Preliminary preparation 1.1 ...
A colleague once told me to use a temporary table...
Today I will talk to you about clearing floats. B...
Table of contents What is maintainable code? Code...