nginx 配置web服务


start nginx //启动nginx
nginx -s stop //停止nginx

-01.--nginx.conf 配置web服务-------------

#user nobody;
worker_processes 8;
worker_rlimit_nofile 65536;

error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;

#pid logs/nginx.pid;

events {
worker_connections 20480;
accept_mutex on;
multi_accept on;
}

http {
include mime.types;
default_type application/octet-stream;

#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';

access_log off;
#access_log logs/access.log main;

sendfile on;
tcp_nopush on;

keepalive_timeout 65;

#gzip on;

#前端配置
server {
listen 8080;
server_name localhost;

#charset koi8-r;

#access_log logs/host.access.log main;

location / {
root D:Examexam.WebUI;
index index.html index.htm;
}
}

}

原文地址:https://www.cnblogs.com/csj007523/p/13692189.html