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
I was woken up by a phone call early in the morni...
Question 1: How do you instruct the browser to dis...
Preview versions of Safari (Technology Preview 10...
MySQL is an open source small relational database...
This article uses an example to describe how to q...
Introduction react-i18next is a powerful internat...
Layout part: <div id="slider"> &l...
Project Purpose Migrate the data in MySQL 5.5.53 ...
Table of contents What is the reason for the sudd...
1. Installation environment Docker supports the f...
Preface The logical judgment statements we use in...
There is currently a requirement that an operatio...
I was bored and sorted out some simple exercises ...
The vue part is as follows: <template> <...
Preface I recently used :first-child in a project...