分类: 源码/模板

  • Ripro日主题9.1开源修正版适用于知识付费资源素材博客WordPress主题模板

    Ripro日主题9.1开源修正版适用于知识付费资源素材博客WordPress主题模板

    由于最近fa图标的源网址失效导致后台菜单图标不显示异常,Ripro主题官方升级了9.0修复版,小编整合之前的全解开源修正版重新进行修复优化后改为9.1.0版本,另增加了纯文本小工具一排三列自适应展示符合现代主题审美,还是那句提示,开心版总归开心版仅供个人学习,如果运营还是要支持正版。

    版本概述:

    重新整合优化主题源码全开源提升版本为Ripro 9.1.0

    支持易支付接口对接,修复登录报错,修复无法开通VIP

    修复后台设置菜单ico图标显示异常bug

    新增首页纯文字标题工具一排三列自适应展示

    版本演示:

  • LicenseBox1.6.4汉化版 – PHP域名授权许可证秘钥激活系统和推送更新管理器

    LicenseBox1.6.4汉化版 – PHP域名授权许可证秘钥激活系统和推送更新管理器

    LicenseBox – 可用于管理PHP应用程序、WordPress插件和主题的域名授权许可证秘钥和更新的一体化处理计划。易于运用的平台提供了一个用户友好的界面,并且需求最少的效劳器资源来运转。但这还不是全部——LicenseBox还附带集成示例、示例代码和内置助手文件生成器,使集成到现有应用程序中变得轻而易举。假如您担忧平安性,我们为您提供了内置的PHP混淆加密功能可用。

    LicenseBox由两局部组成:您在本人的服务器上装置的主脚本(控制面板)和您在PHP应用程序中包含的单个协助文件。多亏了强大的REST API,您还能够运用任何其他编程言语轻松访问API。

    运转环境:

    PHP 7或更高版本,MySQL/MariaDB 5.6或更高版本,PDO PHP扩展,Curl PHP扩展,Openssl PHP扩展

    注意伪静态设置: location / { try_files $uri $uri/ /index.php?$query_string; }

    功用特征:

    顶级答应处理计划 – LicenseBox是一个高评级的答应处理计划,被许多著名的Envato作者和自在职业者运用。
    毫不费力地管理您产品的答应 – 轻松管理产品的答应,包括自动答应、支持和更新过时电子邮件通知。
    轻松为您的产品分发更新 – 运用LicenseBox管理产品的更新,只需在管理面板上单击一下即可发布新的更新。
    友好的界面 – LicenseBox为开发人员提供了用户友好的界面和全面、易于了解的文档。
    准确受权 – 将受权答应证精准到域名/IP,完好的PHP答应处理计划 – LicenseBox具有强大的API、代码示例和示例,是一个功用丰厚的PHP许可证秘钥系统。

    安装教程:

    1、将源码上传到网站根目录
    2、将数据库文件导入到网站数据库
    3、修正数据库配置文件/application/config/database.php,修正为你本人的数据库信息
    4、修正网站配置文件/application/config/config.php,修正网址为你本人的
    5、访问域名,管理员账号:admin@qq.com 密码:admin123

  • PHP源商城V1.2开源版本 专业的虚拟产品销售平台源码

    PHP源商城V1.2开源版本 专业的虚拟产品销售平台源码

    源商城V1.2开源版本 专业的虚拟产品销售平台源码,简洁大气虚拟商城源码,可做发卡网站使用,支持对接官方支付、易支付、码支付、免签支付等、安装包上传到网站输入域名按照提示配置一键安装即可。

    测试环境:

    Linux系统 宝塔面板 Thinkphp伪静态 PHP7.2+ 设置网站根目录/public (不支持虚拟机)

    源码介绍:

    源商城系统是源分享全新推出的一款轻量级、高性能的开源商城系统。系统基于ThinkPhp5.0+mysql+Vue开发,完善的后台权限管理、会员管理、订单管理、产品管理、数据统计、系统配置、组合数据管理、日志管理、数据库管理,支持队列、PHP快速生成表单、图表统计、表格导出等功能。能够快速积累客户、会员数据分析、智能转化客户、有效提高销售、吸引流量、网络营销、品牌推广的一款产品,且更适合大家二次开发。

    演示图:

    手机模板

  • ZFAKA发卡网站源码开源版可在线升级附赠视频搭建教程

    ZFAKA发卡网站源码开源版可在线升级附赠视频搭建教程

    ZFAKA发卡网站源码开源版可在线升级,比较简约的发卡源码之前看到小伙伴使用感觉挺好看的,源码在开源仓库里可以免费下载,小编测试了一下搭建有点绕弯,感觉一般小白看不懂文字教程,小编就随手录制了视频搭建教程相比文本教程应该简单多了,有需要的小伙伴可以下载观看学习和自行搭建。

    前端演示:

  • 适配B2主题的WordPress外链跳转插件AnyLink

    适配B2主题的WordPress外链跳转插件AnyLink

    适配B2主题的WordPress外链跳转插件AnyLink

    WordPress内容中如果有外链,据说直接跳转会传递权重。另外也可能会误导用户。我们可以做一个中间页,起到提醒的作用,撇清与外链的关系。有很多插件可以实现这样的功能,也有人用代码来实现。本站使用了Anylink这款插件。通过一个简单的小改造,实现了和B2主题完美融合的效果。

    适配B2主题的WordPress外链跳转插件AnyLink

    Anylink插件功能齐全,可以批量转换历史文章,也支持自定义类型的文章。在发布文章时就会按你的设置自动处理外链了。如果你使用的是其他的WordPress主题,可以自己在官方插件库中安装,然后自己修改插件根目录的re.php文件。如果你也使用B2主题,直接下载文章后面的插件安装即可。

    需要注意的是,使用时,如下图所示,将【跳转HTTP代码】选项设置为【JavaScript中间页跳转】。

    适配B2主题的WordPress外链跳转插件AnyLink

    其他设置根据自己需要调整,功能还是很强大的!

    适配B2主题的WordPress外链跳转插件AnyLink
  • 一个多端(PC、WAP)阅读,功能完善的原创文学 CMS 系统

    一个多端(PC、WAP)阅读,功能完善的原创文学 CMS 系统

    Java程序相对来说上手的难度还是要高些的,所以导致Java开发的小说程序,没有php或者python的那么受欢迎。比如 易读小说 也是这个情况。

    学习的成本对一般用户来说太高了。

    今天推荐的这个小说程序是基于Java的 SMM开发的,并且使用了Redis等,运行效率很不错。

    功能也比较强大,具体功能介绍可以看下面。要突出说明的是这款程序支持原创作者。也就是说你要做自己的原创文学站可以考虑下,比杰奇3.x什么的是强大多了的。

    1. 小说精品屋介绍

    小说精品屋是一个多平台(web、安卓 app、微信小程序)、功能完善的响应式小说弹幕网站,包含精品小说专区、轻小说专区和漫画专区。包括小说 / 漫画分类、小说 / 漫画搜索、小说 / 漫画排行、完本小说 / 漫画、小说 / 漫画评分、小说 / 漫画在线阅读、小说 / 漫画书架、小说 / 漫画阅读记录、小说下载、小说弹幕、小说 / 漫画自动采集 / 更新 / 纠错、小说内容自动分享到微博、邮件自动推广、链接自动推送到百度搜索引擎等功能。

    2. 小说精品屋 – plus 介绍

    增强版本,在小说精品屋的基础上,重新进行了数据库设计、代码重构和功能增强,提升了程序整体的可读性和性能,增加了很多商用特性,致力于打造一个完整的商用小说门户平台。

    3. 技术栈

    Springboot+Mybatis+Ehcache+Thymeleaf+Mysql

    4. 硬件要求

    Cpu:1 核 +

    内存:1G+

    硬盘:20G+

    前台演示

    1. 进入演示站点

    2. 注册 / 登录账号

    3. 进入用户中心,查看屋币余额

    4. 点击立即充值按钮,进入充值界面

    5. 选择支付宝充值 50 元,充值前余额 74000 屋币,充值后余额 79000 屋币

    5. 安装教程

    5.1 安装包下载上传

    从 github 上下载安装包,并上传到服务器上,运行 unzip 命令解压压缩包得到 novel-plus-install-v1.0.0.zip 文件夹。

    5.2 Mysql 安装配置

    1.Linux 环境下 Mysql 安装教程。(https://www.runoob.com/mysql/mysql-install.html

    2. 修改 MySQL 的 max_allowed_packet 配置(建议 100M)(https://blog.csdn.net/qq_34988304/article/details/92762504

    3. 连接 Mysql 服务,创建数据库 novel_plus(可自定义数据库名):create database novel_plus default character set utf8mb4 collate utf8mb4_general_ci 。

    4. 导入 novel-plus-install-v1.0.0.zip/sql/novel_plus.sql 文件。

    5.3 JDK 安装配置

    JDK1.8 安装教程:https://blog.csdn.net/github_38336924/article/details/82221258

    5.4 运行爬虫管理系统

    1. 进入 novel-plus-install-v1.0.0.zip/novel-crawl 目录下,修改 application-common-dev.yml 配置文件中的数据库配置和登陆配置。

    2. 进入 novel-plus-install-v1.0.0.zip/novel-crawl 目录下,运行 setsid java -jar novel-crawl-1.0.0.jar 命令启动程序。

    3. 放行 8083 端口号。

    4. 浏览器访问,默认端口号 8081。

    5.5 运行前台门户网站。

    1. 进入 novel-plus-install-v1.0.0.zip/novel-front 目录下,修改 application-common-dev.yml 配置文件中的数据库配置和图片保存方式。

    2. 进入 novel-plus-install-v1.0.0.zip/novel-front 目录下,运行 setsid java -jar novel-front-1.0.0.jar 命令启动程序。

    3. 放行 8085 端口号。

    4. 浏览器访问,默认端口号 8085。

  • GoNovel-基于Go的小说采集器及网站源码

    GoNovel-基于Go的小说采集器及网站源码

    基于beego的小说采集展示网站

    环境说明

    Go1.9+
    
    Beego1.7.2
    
    MySQL5.7

    效果展示

    PC网站效果

    H5网站效果

    管理后台效果

    安装说明

    Go环境和MySQL请自行安装。

    下载源码

    go get -u github.com/vckai/novel
    cd $GOPATH/src/github.com/vckai/novel
    go build

    导入SQL文件

    ./data/novel.sql 小说主数据库信息文件
    ./data/chapter.sql 小说章节

    配置 请根据实际情况修改app.conf和data.conf的配置文件

    cp ./conf/app.conf.example ./conf/app.conf
    cp ./conf/data.conf.example ./conf/data.conf

    运行访问

    ./novel

    然后在浏览器中输入localhost:8089 访问首页 进入localhost:8089/admin进入后台,初始用户名/密码:

    admin/admin123
  • WordPress无缝配合CloudFront实现CDN加速

    WordPress无缝配合CloudFront实现CDN加速

    Introduction

    AWS cloudfront or Amazon cloudfront is a content delivery network(CDN) service. It deliver data into end users up on request through secure, low latency, high speed network. The AWS CDN physical servers, are integrated to AWS global infrastructure and with other AWS services like Amazon EC2, Amazon S3, Load Balancing etc.

    Benefits

    • Amazon CloudFront is globally distributed with highly-resilient Amazon backbone network.
    • We don’t have to pay for any data transferred between AWS other services and with CloudFront.
    • Highly programmable using Lambda@Edge functions and can run our custom codes.
    • Amazon CloudFront supports API calls, WebSocket traffic. Also supports proxy methods like POST, PUT, OPTIONS, DELETE and PATCH.
    • CloudFront has the option of modifying the original Headers from client.

    Normal Work Flow of AWS CloudFront.

    • An End User access a website and request and image object to download through browser.
    • DNS service route the end user request to the nearest CloudFront edge location.
    • CloudFront edge location server checks its cache for the requested files and return the results to the end user.

    The pricing

    The Amazon CloudFront charges are mainly based on below areas. The details can be found from the AWS website and using AWS monthly calculator. There will be a slight change in price according to the Region.

    DATA TRANSFER OUT (INTERNET/ORIGIN)
    HTTP/HTTPS REQUESTS
    INVALIDATION REQUESTS
    FIELD LEVEL ENCRYPTION REQUESTS
    DEDICATED IP CUSTOM SSL CERTIFICATES ASSOCIATED WITH A CLOUDFRONT DISTRIBUTION

    Currently the aws cloudfront has 216 Points of Presence or edge locations available or called by the name amazon CDN locations. Each edge locations are inter connected and sync our data automatically. The updated list can be found from the Amazon website itself.

    Benefits of Using cloudfront In WordPress

    • WordPress holds 28% of the web market share but there is room for improvement. Here comes the picture of cloudfront in WordPress.
    • Cloundfront increase the performance of our website by reducing server load.
    • It reduces the cost of operating your WordPress infrastructure by reducing Resource Allocation.
    • Reduces the traffic towers to the origin server by serving cached results to the end users.
    • The DNS server will hit the CloudFront CDN first and serve a copy of the content to the end users from cache and from the closet aws cloudfront edge locations related to the end user Geo location. The Cloudfront will pull content from the behind application servers or any other integrated service as it becomes new or something changed.
    • We will have option for cloudfront gzip which can reduce the size of the data send to end users by 70 percent.
    • Have the option named cloudfront http2 which will also support http2 versions.

    Some CloudFront definitions.

    TerminologyDefinitions
    DistributionAn DNS endpoint name we can use to send traffic. Normally we point our domain name to the distribution via DNS
    OriginThis is where our applications hosted. An origin can be either an Amazon S3 bucket or an HTTP server.
    BehaviorA URL pattern and its associated caching behaviour.

    In our case we create multiple behaviors for the various WordPress URL requests and all that using single Origin and Distribution. Example Behavior are like WordPress admin pages should never be cached and other pages can be cached for a period of time.

    In the case of WordPress, we have the following files/folders to think about

    Folder Paths or FilesContent or Usage
    /wp-content/* and /wp-includes/*Most of the static assets and theme files will likely be here
    /wp-admin/* and /wp-login.php*The admin pages
    /wp-json/*The root URL for the REST API
    /contact/Replace this url with your own contact form url
    /wp-signup.phpUsed for visitor signups if your site supports it
    /wp-trackback.phpBlog post trackback functionality
    /xmlrpc.phpThe WordPress API
    /wp-cron.phpWordPress scheduled task functionality
    /.well-known/*This is a required route for Let’s Encrypt postbacks
    Everything elseHomepage, sub pages, blog posts, etc.

    So lets get started and see how we can setup Amazon CloudFront with WordPress.

    Section 1. Create Cache Policy

    Using this policy key settings we specify the values in viewer requests that CloudFront includes in the cache key. The values that we include in the cache key are automatically included in requests that CloudFront sends to the origin. For WordPress websites we need create cache policy like below.

    For that Log into the AWS management panel and go to the “CloudFront service” section.

    Under “Policy” option and under “Cache” tab click “Create cache policy” button

    A new window will open from there use below settings and hit create button.

    Give a Name for Policy we create, Like “Custom-Managed-Cache-Policy”.
    Minimum TTL 1
    Maximum TTL 31536000
    Default TTL 86400
    Whitelist the headers “Host,origin and Referer”
    Allow “All” for Cookies and Query Strings.
    Compression support gzip only

    Refer above screenshot so you will get an idea about how the cache policy will look like. Now lets move to the next section.

    Section 2. Create Origin Request Policy

    In this section we are creating our own origin request policy to customise the information from the viewer request that you want CloudFront to include in the origin request for proper working of our WordPress websites. We needed this because Some information from the viewer request, such as URL query strings, HTTP headers, and cookies, is not included in the origin request by default. So lets get started.

    From the AWS management panel itself and go to the “CloudFront service” section.

    Under “Policy” option and under “Origin Request” tab click “Create origin request policy” button

    A new window will open from there use below settings and hit create button.

    Give a name like “Custom-headers-passed”
    whitelist the headers “Host,origin, Referer , CloudFront-Is-Desktop-Viewer, CloudFront-Is-Mobile-Viewer and CloudFront-Is-Tablet-Viewer”
    WordPress makes extensive use of cookies, and we need forward at least below cookiescomment_author_*
    comment_author_email_*
    comment_author_url_*
    wordpress_logged_in_*
    wordpress_test_cookie
    wp-settings-*
    PHPSESSID
    wordpress_*
    wordpress_sec_*
    There are lots of places where WordPress will use query strings in the URL, so we need to instruct CloudFront how to handle those as well. So Choose “All”

    Now Again create Another Origin request Policy with name “Custom-Header-Passed-NoCache”. In that use below settings and hit create button.

    Headers – All viewer headers
    Cookies – All
    Query strings – All

    Okay, by creating above two origin request policy, using one policy  we define selected Headers pass to or forward to origin from Cloudfront as per the origin request policy. We Choose only minimum Host headers that we need to pass. This policy will later used for caching the client request types according to the behaviour under our Cloudfront distribution.

    Using the other origin policy  our CloudFront  distribution will not cache objects but will instead send all requests to your Origin for processing. This policy will be used for WordPress URL request types that we don’t wish to cache by Cloudfront.

    Suppose we use any policy with Headers, Cookies and query string values as “None” then CloudFront could serve the wrong content in certain circumstances, such as when you host content for multiple websites on the same server. So make sure you don’t use any such Origin policy for your Cloudfront distribution.

    So in short we will use these policy according to different type of Behaviour we create on our Cloudfront distribution. Below screenshots will show the settings of two origin request  policy we created.

    Okay, this completes the creation of Custom Origin policy section. Now lets move to the next section.

    Section 3. Issue SSL Certificate

    In this section we are issuing SSL certificate for our WordPress domain name using “AWS Certificate Manager”. The SSL issues through ACM is free of cost. Once we purchased it Normally it will be issued with in 15 Min.

    During the creation of Cloudfront distribution we normally input our websites name in the Alternate Domain Names (CNAMEs) filed. In such cases for those domain names SSL is must thing other wise we will get error like below during the creation of Cloudfront distribution.

    Error occurred
    Bad request.
    (InvalidChangeBatch 400: RRSet of type CNAME with DNS name example.com. is not permitted at apex in zone example.com.)

    So lets see how this can be implemented. We already discussed the steps for issuing SSL/TLS certificate using “AWS Certificate Manager” as a separate blog article. Refer below link if you are looking to issue SSL certificate other wise move to next section. I am not mentioning the steps in this article for avoiding the duplication.

    Section 4. Create Distribution

    In this section we are creating the Cloudfront distribution for our WordPress website. By default CloudFront distribution caches all requests to the origin specified by Origin definition. Means behaves as full page cache and we also have the option to implement custom origin-pull patterns. So lets get started.

    Log into the AWS management panel and go to the “CloudFront service” section.

    Under Distribution click on “Create Distribution”

    The create distribution window will open. In that the first section is origin.

    • In the “Origin Domain Name” field use our Public DNS host-name of EC2 instance where our WordPress Website Hosted because the ec2 instance is our HTTP server.
    • Choose the “Origin Protocol Policy” as “HTTPS Only”. This is how CloudFront communicates with our Origin WordPress EC2 instance server.
    • Choose “Minimum Origin SSL Protocol” as “TLSv1” even though Amazon suggest to use the latest supported one by the server. But the problem with that, is some time the end user having older version of browser will have an issue with loading our website over HTTPS.
    • Leave the filed “Origin path” as blank. By using this filed we can modify the header send by the end user and can insert our desired value.
    • The “Origin name” field will be auto filled and it will be our EC2 instance Public DNS host-name. So Leave it as it is.
    • Leave the “Add custom header” option as blank. We don’t want to insert any customer header value in the origin request.
    • Choose Enable Origin Shield option as “No”. The Origin Shield is is an additional caching layer that can help reduce the load on your origin and help protect its availability but right now we are not choosing this option.
    • Change the value for ” Keep-alive timeouts” into “60” if you website is having low traffic other wise leave it with the default value “5”.
    • Leave other timeout related settings as it is. Basically this time out settings deals with how CloudFront will handle requests to our origin server.
    • Choose the “Compress objects automatically” as yes. CloudFront will compress certain files when the requesting viewer
      or browser includes the header: “Accept-Encoding: gzip”. Delivering compressed objects will improve performance for your users.
    • Choose “Viewer Protocol Policy” as ” Redirect HTTP to HTTPS “. This controls how our end users connect to Cloudfront.
    • Choose ” Allowed HTTP Methods ” as ” GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE ” because, WordPress use POST methods.
    • Cached HTTP methods, leave it as it is.
    • Choose “Restrict Viewer Access(Use Signed URLs or Signed Cookies) as “No”
    • Choose “Cache policy and origin request policy” for Cache key and origin requests.
    • In “Cache Policy” choose our cache policy named “Custom-Cache-Policy” from the drop down menu available next to it.
    • In the “Origin Request Policy”  choose the origin policy as “Custom-headers-passed” from the drop down menu.
    • Leave the “Response Headers Policy” as blank.
    • Choose “Smooth Streaming” as No
    • Leave “Field Level Encryption” option  as blank.
    • Choose “Enable real-time logs” option as No. This only need to enable when we need to debug our cloudfront requests.
    • Leave the “Function associations ” option as blank.
    • In “Price Class” Choose ” Use All Edge Locations”
    • AWS WAF Web ACL as ” None “
    • Alternate Domain Names (CNAMEs)  field give our domain names, like example.com and www.example.com
    • Choose  our  website “SSL Certificate”  generated through AWS certificate manager  from drop down menu available for  ” Custom SSL certificate” option.
    • Leave the “Legacy Clients Support” option as it is. Don’t enable this option.
    • Security Policy as ” TLS1.2_2021″
    • Choose Supported HTTP Versions as  “HTTP/2, HTTP/1.1, HTTP/1.0”
    • Default Root Object , leave as blank, only needed when our website is hosted in S3 bucked
    • Choose Logging  option as  “Off”
    • Choose Enable IPv6  option as  “yes”

    Finally verify the setting again by referring above screenshots and Click Create Distribution. Initially we can see the Cloudfront in progress status and after few minutes we can see the status as “Deployed” and ready to use. This completes the Creation of CloudFront Distribution. Now lets move to the Next section.

    Section 5. Edit Distributions Behaviour.

    In this section we edit the default behaviour of our created distribution which is to cache all request types. But we also need not to cache some of the WordPress URL request pattern types which are give below. We don’t need our wp-admin area and other links mentioned above to be cached by Cloudfront because caching above URL patterns will cause issues to the proper working of a WordPress website. So lets see how these can be done.

    URL PatternUse CasesCaching Status
    /wp-login.phpThe admin pagesNo
    /wp-admin/*The admin pagesNo
    /wp-json/*The root URL for the REST APINo
    /contact/Our Web page contact form url.Replace this url with your own contact form urlNo
    /.well-known/*This is a required route for Let’s Encrypt postbacksNo
    /wp-cron.phpWordPress scheduled task functionalityNo
    /xmlrpc.phpThe WordPress APINo
    /wp-trackback.phpBlog post trackback functionalityNo
    /wp-signup.phpUsed for visitor signups if your site supports itNo

    For that from AWS Panel itself , under Cloudfront services, click on CloudFront Distributions

    click  on ID corresponding to our cloudfront distribution created.

    Click “Behaviour” tab >> Click create New behaviour and use below settings.

    We need to create  new behaviour for each of above listed WordPress URL from the “create behaviour” window. For each behaviour only Path pattern field changes according to the url request types but the rest of the settings will be same.

    • In Path pattern field Give our url like /wp-login.php
    • In Origin or Origin Group   Choose our EC2 instance name available.
    • Choose ” Compress Objects Automatically” as “Yes”.
    • In Viewer Protocol Policy  choose “Redirect HTTP to HTTPS”
    • In Allowed HTTP Methods  choose “GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE”
    • Cached HTTP methods Choose “Options” too
    • Choose “Restrict Viewer Access(Use Signed URLs or Signed Cookies) as “No”
    • Choose “Cache key and Origin Request policy ” as  “Cache policy and origin request policy”
    • Choose Cache Policy as “Custom-managed-Cache-Policy”, this is the cache policy we created in earlier section.
    • Now for the “origin Request Policy”  choose  policy named “Custom-header-Passed-NoCache”. Using this policy we are instructing our CloudFront distribution to not cache when the url request type is /wp-login.php.
    • Leave “Response Header policy” option as blank.
    • Leave “Field-level Encryption Config” as blank.
    • Choose “Smooth Streaming”  as No
    • Choose “Enable real time logs ” as No
    • Leave function associations  option as blank and Save it.

    Repeat the above steps for each URL path pattern. Once completed, the behaviour tab will look like below.

    Now we excluded above WordPress related URL from cached by CloudFront. We don’t need our wp-admin area and other links mentioned above to be cached by CloudFront because caching above URL patterns will cause issues to the proper working of a WordPress website. This completes the editing the behaviour of CloundFront distribution we created. Now lets move to the next section.

    Section 6. Change DNS.

    In this section we are changing our WordPress website DNS A record. For that go the DNS manager section of your own website and create a CNAME pointing www.example.com or example.com at your CloudFront Distribution DNS endpoint. Also don’t forget to delete the existing DNS A records from making conflicts.

    If you are using Route53 as your DNS zone manager. If try to change the record type as CNAME for existing DNS A record type and input the CloudFront Distribution DNS endpoint name. We will get below error.

    Error occurred
    Bad request.
    (InvalidChangeBatch 400: RRSet of type CNAME with DNS name example.com. is not permitted at apex in zone example.com.)

    In order to fix For that go back to AWS panel again
    From the services section choose Route 53 service
    click “Hosted zones” option from the left side
    Now click our website name and the existing DNS records will show up
    select our domain DNS A record and click edit from the right side options

    Choose the Record Type as ” Route traffic to an IPV4 address and somw AWS resources”
    and then enable the alias option
    and then in the route traffic to option, from the drop down menu choose ” alias to cloudfront distribution ”
    gave the CloudFront Distribution DNS endpoint name in the next drop down menu. We can also get the cloudfront distribution DNS endpoint name from the cloudfront services section too.

    Refer below screenshot for a reference.

    Wait for completing the DNS propagation and if we test the domain using curl, we can see “Server: CloudFront”. The Curl command output is given below for your reference.

     curl -v example.com
    * Rebuilt URL to: example.com/
    *   Trying 11.3.45.2...
    * TCP_NODELAY set
    * Connected to example.com (11.3.45.2) port 80 (#0)
    > GET / HTTP/1.1
    > Host: example.com
    > User-Agent: curl/7.58.0
    > Accept: */*
    > 
    < HTTP/1.1 301 Moved Permanently
    < Server: CloudFront
    < Date: Fri, 31 Jul 2020 04:50:10 GMT
    < Content-Type: text/html
    < Content-Length: 183
    < Connection: keep-alive
    < Location: https://example.com/
    < X-Cache: Redirect from cloudfront
    < Via: 1.1 7d2d57745dfgfdgf.cloudfront.net (CloudFront)
    < X-Amz-Cf-Pop: MAA50-C2
    < X-Amz-Cf-Id: zsF3xHc3KIJ-asC-PkWl3I8uw==
    
    <html>
    <head><title>301 Moved Permanently</title></head>
    <body bgcolor="white">
    <center><h1>301 Moved Permanently</h1></center>
    <hr><center>CloudFront</center>
    </body>
    </html>
    * Connection #0 to host example.com left intact
    * Connection #0 to host example.com left intact

    This Completes the DNS changes for our WordPress Website. Now lets move to the Next section.

    Section 7. Use WordPress Cache Plugin

    Now lets proceed with the Use of a Cache Plugin that support CloudFront. When we use WordPress plugin related to CloudFront for site acceleration, the plugin uses a subdomain, also known as an alternate domain name or CNAME, to send your website’s traffic through CloudFront.

    Without this plugin, all the traffic of your website’s viewers goes to the server that hosts your WordPress website. So lets get started. Lets use a Plugin named W3TC.

    Setting Up W3TC

    • Log in to the WordPress administration panel.
    • Browse to the “Plugins” menu page and ensure that the “W3 Total Cache” plugin is installed. If not install it.
    • Activate the plugin by clicking the “Activate” link.
    • Browse to the “Performance -> General Settings” page.
    • In the “CDN” section, enable “CDN” and set the “CDN Type” field to “Generic Mirron”. Click the “Save Settings and Purge Caches” button.
    • Browse to the “Performance -> CDN” page.
    • In the “Configuration: Objects” section
    • In the “Replace Sites Hostname” filed with your own domain name. Click On “Test Mirror” Button and Make sure we get Passed message. Save the settings.

    Okay, this completes setting up our WordPress Cache plugin W3TC for using our created CloudFront distribution.

    Conclusion.

    In this article we discussed about how to Setup CloudFront for our WordPress Website. Enabling CloudFront for our Website will usually improve response time. I hope this article is informative. Leave your thoughts at below comment box.

  • 【清渊冰雪】H5免授权版+多功能脚本+Linux

    【清渊冰雪】H5免授权版+多功能脚本+Linux

    清渊冰雪H5修复进服会没反应或者提示JS错误
    补丁直接解压到/www/wwwroot/web替换,然后清理一下缓存即可。

    清渊冰雪属于冰雪传奇二开的版本,玩法更多,但也不是最新的清渊版本

    清渊端一起放了
    补丁也内置了
    端:
    链接: https://pan.baidu.com/s/15vS-8lHbh7dfNClqIlpOkA?pwd=r7dr 提取码: r7dr
    补丁:
    链接: https://pan.baidu.com/s/1M25ANwcO6SkyQzxl2CXgKg?pwd=b6nv 提取码: b6nv

    彩蛋:
    喜欢改版本的,给你们提供配置表

  • 2023全新AI网址导航系统源码基于Thinkphp6框架开发的开源源码

    2023全新AI网址导航系统源码基于Thinkphp6框架开发的开源源码

    2023全新AI网址导航系统源码,基于Thinkphp6框架开发的开源源码,小编测试了一下运行正常,如有想要搭建网址导航网站的小伙伴可以拿去研究一下,市面上的网站收录网址导航系统太多了,具体功能就不多介绍了自行下载学习研究。

    最新的 thinkphp 6.1 开发的 AI 网址导航是一个十分适用的工具,它可以协助用户便当地阅读和管理本人喜欢的网站。相比于其他的 AI 网址导航,这个项目运用了愈加友好和易用的 ThinkPHP 框架停止搭建,使得开发者和用户都可以轻松上手。

    此次更新的 AI 网址导航,后台能够随意设置导航颜色,让用户能够自在选择本人喜欢的配色计划。同时,该项目还提供了十分简约的用户界面和灵敏的管理模块,让用户能够快速添加、编辑和删除网址信息。此外,该项目还提供了灵敏的分类和排序功用,可依据用户个性化需求停止自定义设置。