Skip to content
/ BlogSEO Public

针对SPA网站的终极SEO工具,使用Puppeteer + Express + Nginx

Notifications You must be signed in to change notification settings

nano71/BlogSEO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

参考的nginx配置

map $http_user_agent $bot {
  default 0;
  "~*Wget|bingbot|Googlebot|Googlebot-Image|Googlebot-Mobile|Googlebot-News|Googlebot-Video|Google-InspectionTool" 1;
}

server {
        listen 443 ssl;
        server_name blog.nano71.com;

        root /var/www/html/blog;
        index index.html;

        ssl_certificate   /etc/nginx/blog.nano71.com_bundle.crt;
        ssl_certificate_key /etc/nginx/blog.nano71.com.key;

        location / {
                if_modified_since off;
                etag off;

                add_header Cache-Control no-cache;

                try_files $uri /index.html;

                if ($bot) {
                        proxy_pass http://localhost:9001;
                }
        }
}

将文件上传到linux后,初始化

npm i

然后运行

./start.bash

About

针对SPA网站的终极SEO工具,使用Puppeteer + Express + Nginx

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published