#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;
#静态文件
server {
listen 8080;
server_name localhost;
location / {
root D:/resources/statichtmls;
}
}
#html文件
server {
listen 8080;
server_name 127.0.0.1 localhost;
location / {
root D:/resources/statichtmls;
index index.html index.htm;
}
}
}
到此这篇关于nginx实现发布静态资源的方法的文章就介绍到这了,更多相关nginx发布静态资源内容请搜索脚本之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持脚本之家!