GraphQL学习、踩坑记录(二)
如果您发现本文排版有问题,可以先点击下面的链接切换至老版进行查看!!!
GraphQL学习、踩坑记录(二)
server {
listen 80;
server_name www.daozhao.com daozhao.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name www.daozhao.com daozhao.com;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
root /home/daozhao.com;
index index.html index.htm index.php;
ssl_certificate /home/ssl/www.daozhao.com.pem;
ssl_certificate_key /home/ssl/www.daozhao.com.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;
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location / {
index index.html index.php;
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}
# Add trailing slash to */wp-admin requests.
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
location ~ \.php$ {
root /home/daozhao.com;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/daozhao.com$fastcgi_script_name;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
都是在网上搜的,也不知道有没有不合理,等学习完了再优化吧。
自己还架设了node服务器,可以使用graphql,通过pm2启动服务,总之很爽。- 分类:
- 吐槽
更新时间:
上一篇:下一篇:
