文件格式为server { listen 80 default_server; listen [::]:80 default_server; server_name _; root /usr/share/nginx/html; # Load configuration files for the default server block. include /etc/nginx/default.d/*.conf; location / { } error_page 404 /404.html; location = /40x.html { }...
# ssl_prefer_server_ciphers on; # # # Load configuration files for the default server block. # include /etc/nginx/default.d/*.conf; # # location / { # } # # error_page 404 /404.html; # location = /40x.html { # } # # error_page 500 502 503 504 /50x.html; # location =...
ssl_certificate_key "/etc/pki/nginx/private.key"; ssl_session_cache shared:SSL:1m; ssl_session_timeout 10m;ssl_ciphersPROFILE=SYSTEM; ssl_prefer_server_ciphers on; # Load configuration files for the default server block. include /etc/nginx/default.d/*.conf; error_page 404 /404.html; loc...
# Load configuration files for the default server block. include /etc/nginx/default.d/*.conf; location / { #return 200 'a'; #root /usr/share/nginx/html; #index index.html index.htm; } error_page 404 /404.html; location = /40x.html { } error_page 500 502 503 504 /50x.html; ...
listen [::]:80 default_server; server_name _; root /usr/share/nginx/html; # Load configuration files for the default server block. include /etc/nginx/default.d/*.conf; location / { } location /images { alias /usr/share/nginx/html/images; ##此处配置了别名 ...
ssl_prefer_server_ciphers on; # Load configuration files for the default server block. include /etc/nginx/default.d/*.conf; location / { proxy_pass http://mobile_pool; } } 可以看到location中proxy_pass 对应于上面那个负载均衡,你如果不想搞负载均衡,在这里写死就完了,只有一台机器,也没啥负载...
#ssl_certificate_key"/etc/pki/nginx/private/server.key"; # ssl_session_cache shared:SSL:1m; # ssl_session_timeout 10m; #ssl_ciphersHIGH:!aNULL:!MD5; # ssl_prefer_server_ciphers on; # # # Load configuration files for the default server block. ...
server { listen 80 default_server; #后缀说明是默认虚拟主机,当所有server不匹配时,匹配这个 listen [::]:80 default_server; server_name _; #下划线可以匹配所有地址名 root /usr/share/nginx/html; # Load configuration files for the default server block. ...
aNULL:!MD5;ssl_prefer_server_ciphers on;# Load configuration filesforthedefaultserver block.include/etc/nginx/default.d/*.conf; location / { } error_page 404 /404.html; location = /40x.html { } error_page 500 502 503 504 /50x.html;...