# For more information on configuration, see: # * Official English Documentation: http://nginx.org/en/docs/ # * Official Russian Documentation: http://nginx.org/ru/docs/
# Load modular configuration files from the /etc/nginx/conf.d directory. # See http://nginx.org/en/docs/ngx_core_module.html#include # for more information. include/etc/nginx/conf.d/*.conf; server { listen80default_server; listen [::]:80default_server; server_nameyourDomainName; # 修改为你对应的文件名 root/usr/share/nginx/html/blog;
return301https://$server_name$request_uri; # Load configuration files for the default server block. include/etc/nginx/default.d/*.conf;
location/ { }
error_page404/404.html; location=/40x.html { }
error_page500502503504/50x.html; location=/50x.html { } } # Settings for a TLS enabled server. # server { listen443ssl; listen [::]:443ssl; server_nameyourDomainName; # 修改为你对应的文件名 root/usr/share/nginx/html/blog;
# Load configuration files for the default server block. include/etc/nginx/default.d/*.conf;