【nginx配置 解决 vue history模式下空白 ,以及SSL证书安装】历览千载书,时时见遗烈。这篇文章主要讲述nginx配置 解决 vue history模式下空白 ,以及SSL证书安装相关的知识,希望能为你提供帮助。
#usernobody;
worker_processes1;
#error_loglogs/error.log;
#error_loglogs/error.lognotice;
#error_loglogs/error.loginfo;
#pidlogs/nginx.pid;
events
worker_connections1024;
http
includemime.types;
default_typeapplication/octet-stream;
#log_formatmain$remote_addr - $remote_user [$time_local] "$request"
#$status $body_bytes_sent "$http_referer"
#"$http_user_agent" "$http_x_forwarded_for";
#access_loglogs/access.logmain;
sendfileon;
#tcp_nopushon;
#keepalive_timeout0;
keepalive_timeout65;
#gzipon;
# another virtual host using mix of IP-, name-, and port-based configuration
#
#server
#listen8000;
#listensomename:8080;
#server_namesomenamealiasanother.alias;
#location /
#roothtml;
#indexindex.html index.htm;
#
#
# HTTPS server
#
#server
#listen443 ssl;
#server_namelocalhost;
#ssl_certificatecert.pem;
#ssl_certificate_keycert.key;
#ssl_session_cacheshared:SSL:1m;
#ssl_session_timeout5m;
#ssl_ciphersHIGH:!aNULL:!MD5;
#ssl_prefer_server_cipherson;
#location /
#roothtml;
#indexindex.html index.htm;
#
#
# HTTPS server//自定义HTTPS配置
server
listen 443 ssl;
server_name www.55776.club; #你的域名
root html; #你的网站根目录
index index.php index.html index.htm; #网站默认访问文件
ssl_certificate../cert/55.crt;
ssl_certificate_key../cert/55.key;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
location /
roothtml;
try_files $uri $uri/ /baiyi/$query_string;
location ~ \\.php(.*)$#HP必须的配置,否则浏览器访问会直接下载php源码文件
fastcgi_pass127.0.0.1:9000;
fastcgi_indexindex.php;
fastcgi_split_path_info^((?U).+\\.php)(/?.+)$;
fastcgi_paramSCRIPT_FILENAME$document_root$fastcgi_script_name;
fastcgi_paramPATH_INFO$fastcgi_path_info;
fastcgi_paramPATH_TRANSLATED$document_root$fastcgi_path_info;
includefastcgi_params;
server
listen 80 ssl;
server_name www.55776.club;
#charset koi8-r;
#access_loglogs/host.access.logmain;
root html/baiyi; #你的网站根目录
index index.php index.html index.htm; #网站默认访问文件
location /
roothtml;
#indexindex.html index.htm;
try_files $uri $uri/ /baiyi/$query_string;
#error_page404/404.html;
# redirect server error pages to the static page /50x.html
#
error_page500 502 503 504/50x.html;
location = /50x.html
roothtml;
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \\.php$
#proxy_passhttp://127.0.0.1;
#
# pass the PHP推荐阅读
- springboot中内置tomcat什么时候创建的,又是什么时候启动的()
- Java 线程系列Java 天生就是多线程
- Java后端常见面试题总结
- JAVA经典面试题附答案(持续更新版)
- 小程序输入框完成自动切换到下个输入框
- vue - ES6模块化promisewebpack打包(所在在学的朋友们先看这篇,看了不吃亏)...
- 面试官(说一下MySQL事务隔离级别())
- 2022 年我们最喜欢的 Chrome 扩展程序
- 多线程 如何自己实现定时器