Tutorial Tutorial Tutorial Application Services Application Services Application Services ~40 phút ~40 min ~40 នាទី Đồng bộ 2026-06-10 Synced 2026-06-10 ធ្វើសមកាល 2026-06-10

Revert cấu hình Revert configuration ទាញយក Configuration

Hướng dẫn chi tiết đồng bộ từ docs Cloudflare — mỗi section có backlink tới đúng vị trí trên trang gốc. Detailed guide synced from Cloudflare docs — each section links to the matching anchor on the official page. មគ្គុទ្ទេសក៍លម្អិតធ្វើសមកាលពី docs Cloudflare — ផ្នែកនីមួយៗមានតំណទៅទីតាំងត្រូវគ្នានៅទំព័រផ្លូវការ។

← Danh mục ← Catalog ← បញ្ជី

Giải thích nhanh Quick context បរិបទរហ័ស

Thuộc nhóm Application Services — tập trung bảo vệ, tăng tốc và vận hành ứng dụng/web phía trước origin. Tutorial «6 – Revert configuration» giúp bạn làm quen luồng triển khai thật — phù hợp đọc trước khi mở tài liệu gốc tiếng Anh. Docs gốc chia khoảng 5 bước chính; bản tóm tắt dưới đây giúp bạn nắm khung trước khi làm theo từng lệnh.

Sometimes, you may have to roll back configuration changes. To revert your configuration, check out the desired branch and ask Terraform to move your Cloudflare settings back in time.

នៅពេលដែលអ្នកអាចធ្វើឱ្យប្រសើរឡើងការផ្លាស់ប្តូរកំណត់ផែនការ។ ដើម្បីជួសជុលការកំណត់របស់អ្នក, សូមពិនិត្យមើលឧបករណ៍ដែលអ្នកចង់និងសួរ Terraform ដើម្បីជួសជុលការកំណត់ Cloudflare របស់អ្នកនៅពេលវេលា។

Lưu ý Note ចំណាំ

Lưu ý trước khi làm Notes before you start ចំណាំមុនពេលចាប់ផ្តើម

  • Đây là bản tóm tắt trên Orange Cloud Learning Hub — không thay thế tài liệu chính thức.
  • Luôn mở liên kết «Tài liệu gốc» bên dưới khi cần lệnh CLI, snippet code và ảnh minh họa đầy đủ.
  • Kiểm tra token/API và state backend trước khi chạy trên môi trường production.
  • Docs Cloudflare cập nhật thường xuyên — đối chiếu ngày «Rà soát lần cuối» trên trang gốc khi triển khai production.
  • This is a summary on Orange Cloud Learning Hub — it does not replace the official documentation.
  • Open the Official docs link below for CLI commands, code snippets, and full screenshots.
  • Verify API tokens and the state backend before running against production.
  • Cloudflare docs change frequently — verify the Last reviewed date on the official page before production use.
  • នេះគឺជាការបញ្ជាក់អំពី Orange Cloud Learning Hub — វាគឺជាការផ្លាស់ប្តូរនៃឯកសារផ្លូវការ។
  • ចុចតំណភ្ជាប់ Docs Official នៅខាងក្រោមសម្រាប់ការបញ្ជា CLI, សៀវភៅកូដនិងរូបថតពេញលេញ។
  • សូមពិនិត្យមើល API tokens និងការបង្វិលប្រព័ន្ធប្រតិបត្តិការមុនពេលធ្វើការប្រឆាំងនឹងការផលិត។
  • Cloudflare បានផ្លាស់ប្តូរជាធម្មតានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅពេលវេលានៅ។

Overview Overview Overview

Phần «Tổng quan» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.

Read the "Overview" section below — open the official docs link for full screenshots and configuration tabs.

អានផ្នែក «Overview» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។

Mở section docs gốc ↗ Open source section ↗ បើកផ្នែក docs ផ្លូវការ ↗
Đôi khi, bạn có thể phải cuộn lại các thay đổi cấu hình. Ví dụ, bạn có thể muốn chạy thử nghiệm hiệu suất trên một cấu hình mới hoặc có thể bạn đã gõ nhầm địa chỉ IP và đưa toàn bộ trang web của bạn xuống.
Sometimes, you may have to roll back configuration changes. For example, you might want to run performance tests on a new configuration or maybe you mistyped an IP address and brought your entire site down.
នៅពេលដែលអ្នកអាចធ្វើឱ្យប្រសើរឡើងការផ្លាស់ប្តូរកំណត់ផែនការ។ ឧទាហរណ៍អ្នកអាចចង់អនុវត្តការធ្វើតេស្តប្រសិទ្ធភាពនៅលើការកំណត់ថ្មីឬអ្នកអាចធ្វើតេស្តអាសយដ្ឋាន IP និងធ្វើតេស្តគេហទំព័ររបស់អ្នកទាំងអស់។
Để đảo ngược cấu hình của bạn, hãy kiểm tra nhánh mong muốn và yêu cầu Terraform để di chuyển Cloudflare cài đặt của bạn trở lại thời gian. Nếu bạn vô tình đưa trang web của bạn xuống, hãy xem xét thiết lập một chiến lược tốt cho các yêu cầu thu hút đánh giá ngang hàng thay vì sáp nhập trực tiếp vào master như được thực hiện trong các hướng dẫn về sự ngắn gọn.
To revert your configuration, check out the desired branch and ask Terraform to move your Cloudflare settings back in time. If you accidentally brought your site down, consider establishing a good strategy for peer reviewing pull requests rather than merging directly to master as done in the tutorials for brevity.
ដើម្បីជួសជុលការកំណត់របស់អ្នក, សូមពិនិត្យមើលឧបករណ៍ដែលអ្នកចង់និងសួរ Terraform ដើម្បីជួសជុលការកំណត់ Cloudflare របស់អ្នកនៅពេលវេលា។ ប្រសិនបើអ្នកបានកាត់បន្ថយគេហទំព័ររបស់អ្នកដោយគួរឱ្យចាប់អារម្មណ៍ចំពោះការបង្កើតគោលបំណងល្អសម្រាប់ការពិនិត្យឡើងវិញគួរឱ្យចាប់អារម្មណ៍ជាងការរួមបញ្ចូលដោយផ្ទាល់ទៅ master ដូចដែលបានធ្វើនៅក្នុងការបណ្តុះបណ្តាលសម្រាប់ភាពងាយស្រួល។
Các đoạn mã Terraform dưới đây chỉ đề cập đến v5 SDK.
Terraform code snippets below refer to the v5 SDK only.
Terraform សៀវភៅកូដខាងក្រោមបង្ហាញតែសម្រាប់ SDK v5 ។

1.Điều Xem lịch sử cấu hình của bạn 1. Review your configuration history 1 ។ ពិនិត្យឡើងវិញប្រវត្តិសាស្រ្ត Configuration របស់អ្នក

Phần «Review your configuration history» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.

Read the "1. Review your configuration history" section below — open the official docs link for full screenshots and configuration tabs.

អានផ្នែក «1 ។ ពិនិត្យឡើងវិញប្រវត្តិសាស្រ្ត Configuration របស់អ្នក» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។

Mở section docs gốc ↗ Open source section ↗ បើកផ្នែក docs ផ្លូវការ ↗
Trước khi xác định mức độ quay trở lại, hãy xem lại lịch sử Git của bạn:
Before determining how far back to revert, review your Git history:
មុនពេលធ្វើតេស្តពីរបៀបដែលអ្នកត្រូវដោះស្រាយដោះស្រាយដោះស្រាយដោះស្រាយដោះស្រាយដោះស្រាយដោះស្រាយដោះស្រាយដោះស្រាយដោះស្រាយដោះស្រាយដោះស្រាយដោះស្រាយដោះស្រាយដោះស្រាយដោះស្រាយដោះស្រាយដោះស្រាយដោះស្រាយដោះស្រាយដោះស្រាយដោះស្រាយដោះស្រាយដោះស្រាយដោះស្រាយដោះស្រាយដោះស្រាយដោះស្រាយ។
Cửa sổ Terminal
Terminal window
បង្វិល Terminal
text
git log --oneline
text
f1a2b3c Step 5 - Add two Page Rules

d4e5f6g Step 4 - Create load balancer (LB) monitor, LB pool, and LB

a7b8c9d Step 3 - Enable TLS 1.3, automatic HTTPS rewrites, and strict SSL

e1f2g3h Step 2 - Initial Terraform v5 configuration
Một lợi ích khác của việc lưu trữ cấu hình Cloudflare của bạn trong Git là bạn có thể xem ai đã thực hiện thay đổi. Bạn cũng có thể xem ai đã xem xét và phê duyệt thay đổi nếu bạn đánh giá ngang hàng các yêu cầu kéo.
Another benefit of storing your Cloudflare configuration in Git is that you can see who made the change. You can also see who reviewed and approved the change if you peer-review pull requests.
អត្ថប្រយោជន៍ផ្សេងទៀតនៃការផ្ទុកកំណត់ Cloudflare របស់អ្នកនៅក្នុង Git គឺថាអ្នកអាចមើលអ្នកដែលបានធ្វើការផ្លាស់ប្តូរ។ អ្នកអាចមើលឃើញអ្នកដែលបានពិនិត្យឡើងវិញនិងអនុម័តការផ្លាស់ប្តូរនេះដោយប្រសិនបើអ្នកបានពិនិត្យឡើងវិញតម្រូវការបង្វិល។
Cửa sổ Terminal
Terminal window
បង្វិល Terminal
text
git log
Kiểm tra khi nào thay đổi lần cuối:
Check when the last change was made:
សូមមើលពេលដែលការផ្លាស់ប្តូរចុងក្រោយនេះបានធ្វើឡើង:
Cửa sổ Terminal
Terminal window
បង្វិល Terminal
text
git show
Điều này cho thấy cam kết gần đây nhất và các tập tin nào đã thay đổi.
This shows the most recent commit and what files changed.
វាត្រូវបានបង្ហាញពីការធ្វើតេស្តចុងក្រោយបំផុតនិងឯកសារដែលបានផ្លាស់ប្តូរ។

2.Đối với Kịch bản: Trở lại Page Rules 2. Scenario: Revert the Page Rules 2 ។ រូបភាព: revert the Page Rules

Phần «Scenario: Revert Page Rules» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.

Read the "2. Scenario: Revert the Page Rules" section below — open the official docs link for full screenshots and configuration tabs.

អានផ្នែក «2 ។ រូបភាព: revert the Page Rules» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។

Mở section docs gốc ↗ Open source section ↗ បើកផ្នែក docs ផ្លូវការ ↗
Giả sử rằng ngay sau khi bạn triển khai Page Rules khi làm theo hướng dẫn Add exceptions with Page Rules, bạn được thông báo rằng URL không còn cần thiết nữa, và thiết lập bảo mật và chuyển hướng nên bị loại bỏ.
Assume that shortly after you deployed the Page Rules when following the Add exceptions with Page Rules tutorial, you are told the URL is no longer needed, and the security setting and redirect should be dropped.
សូមប្រាកដថាបន្ទាប់ពីអ្នកបានដំឡើង Page Rules នៅពេលដែលអ្នកតាមដាន Add exceptions with Page Rules អ្នកបានប្រាកដថា URL នេះមិនចាំបាច់ទៀតហើយការដំឡើងសុវត្ថិភាពនិងការដំឡើងបន្ថយគួរតែត្រូវបានបាត់បង់។
Trong khi bạn luôn có thể chỉnh sửa tập tin config trực tiếp và xóa các mục đó, bạn có thể sử dụng Git để làm điều đó cho bạn.
While you can always edit the config file directly and delete those entries, you can use Git to do that for you.
ទោះបីជាអ្នកអាចគ្រប់គ្រងឯកសារ config បានដោយផ្ទាល់ហើយទាញយកឯកសារទាំងនេះទេប៉ុន្តែអ្នកអាចប្រើ Git ដើម្បីធ្វើដូច្នេះសម្រាប់អ្នក។

Liên kết liên quan (docs Cloudflare) Related links (Cloudflare docs) តំណពាក់ព័ន្ធ (docs Cloudflare)

Trở lại sử dụng Git Revert using Git ការប្រើប្រាស់ Git

Phần «Revert using Git» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.

Read the "Revert using Git" section below — open the official docs link for full screenshots and configuration tabs.

អានផ្នែក «ការប្រើប្រាស់ Git» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។

Mở section docs gốc ↗ Open source section ↗ បើកផ្នែក docs ផ្លូវការ ↗
Sử dụng Git để tạo một cam kết đảo ngược hủy bỏ các thay đổi Page Rules:
Use Git to create a revert commit that undoes the Page Rules changes:
ប្រើ Git ដើម្បីបង្កើត kommit revert ដែលជួសជុលការផ្លាស់ប្តូរ Page Rules:
Cửa sổ Terminal
Terminal window
បង្វិល Terminal
text
git revert HEAD
Git sẽ mở trình soạn thảo mặc định của bạn với một thông báo cam kết. Lưu và gần để chấp nhận thông báo mặc định, hoặc tùy chỉnh nó:
Git will open your default editor with a commit message. Save and close to accept the default message, or customize it:
Git នឹងបើកកម្មវិធីបញ្ជាទូទៅរបស់អ្នកជាមួយនឹងសេចក្តីអធិប្បាយ។ ការសរសេរនិងការសរសេរដើម្បីទទួលយកទិន្នន័យទិន្នន័យទិន្នន័យទិន្នន័យទិន្នន័យទិន្នន័យទិន្នន័យ:
text
Revert "Add Page Rules for security and redirects"


This reverts commit f1a2b3c4d5e6f7a8b9c0d1e2f3g4h5i6j7k8l9m0.

3 Cái Dự đoán những thay đổi 3. Preview the changes 3 ។ ពិនិត្យឡើងវិញការផ្លាស់ប្តូរ

Phần «Preview changes» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.

Read the "3. Preview the changes" section below — open the official docs link for full screenshots and configuration tabs.

អានផ្នែក «3 ។ ពិនិត្យឡើងវិញការផ្លាស់ប្តូរ» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។

Mở section docs gốc ↗ Open source section ↗ បើកផ្នែក docs ផ្លូវការ ↗
Kiểm tra Terraform sẽ làm gì với cấu hình đảo ngược:
Check what Terraform will do with the reverted configuration:
សូមមើលអ្វីដែល Terraform នឹងធ្វើជាមួយនឹងការកំណត់ផែនការដែលបានបិទ:
Cửa sổ Terminal
Terminal window
បង្វិល Terminal
text
terraform plan
Kết quả dự kiến:
Expected output:
ផលិតផលដែលគួរឱ្យចាប់ផ្តើម:
text
Plan: 0 to add, 0 to change, 2 to destroy.


Terraform will perform the following actions:


  # cloudflare_page_rule.expensive_endpoint_security will be destroyed

  # cloudflare_page_rule.legacy_redirect will be destroyed
Như mong đợi, Terraform sẽ loại bỏ hai Page Rules đã được thêm vào trong hướng dẫn 5.
As expected, Terraform will remove the two Page Rules that were added in tutorial 5.
ដូចគ្នានេះ Terraform នឹងបាត់បន្ថយទាំងពីរ Page Rules ដែលបានបន្ថែមនៅក្នុង Tutorial 5 ។

Bốn Áp dụng những thay đổi 4. Apply the changes 4 ។ ការអនុវត្តនៃការផ្លាស់ប្តូរ

Phần «Apply changes» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.

Read the "4. Apply the changes" section below — open the official docs link for full screenshots and configuration tabs.

អានផ្នែក «4 ។ ការអនុវត្តនៃការផ្លាស់ប្តូរ» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។

Mở section docs gốc ↗ Open source section ↗ បើកផ្នែក docs ផ្លូវការ ↗
Áp dụng các thay đổi để loại bỏ Page Rules khỏi vùng Cloudflare của bạn:
Apply the changes to remove the Page Rules from your Cloudflare zone:
សូមអនុវត្តការផ្លាស់ប្តូរដើម្បីជួសជុល Page Rules ពីតំបន់ Cloudflare របស់អ្នក:
Cửa sổ Terminal
Terminal window
បង្វិល Terminal
text
terraform apply --auto-approve
text
cloudflare_page_rule.expensive_endpoint_security: Destroying...

cloudflare_page_rule.legacy_redirect: Destroying...

cloudflare_page_rule.expensive_endpoint_security: Destruction complete after 1s

cloudflare_page_rule.legacy_redirect: Destruction complete after 1s


Apply complete! Resources: 0 added, 0 changed, 2 destroyed.
Hai tài nguyên đã bị phá hủy, như mong đợi, và bạn đã quay trở lại phiên bản trước đó.
Two resources were destroyed, as expected, and you have rolled back to the previous version.
វាត្រូវបានកាត់បន្ថយប្រសិនបើយោងតាមការចាប់ផ្តើមរបស់អ្នកហើយអ្នកបានកាត់បន្ថយប្រសិនបើយោងតាមប្រសិនបើយោងតាមការចាប់ផ្តើមមុន។

5 Kiểm tra lại 5. Verify the revert 5 ។ ពិនិត្យឡើងវិញ

Phần «Xác minh revert» — đọc hướng dẫn bên dưới, dùng liên kết docs gốc để xem ảnh minh họa và tab cấu hình đầy đủ.

Read the "5. Verify the revert" section below — open the official docs link for full screenshots and configuration tabs.

អានផ្នែក «5 ។ ពិនិត្យឡើងវិញ» ខាងក្រោម — បើកតំណ docs ផ្លូវការសម្រាប់រូបភាព និង tab កំណត់។

Mở section docs gốc ↗ Open source section ↗ បើកផ្នែក docs ផ្លូវការ ↗
Kiểm tra rằng Page Rules không còn hoạt động:
Test that the Page Rules are no longer active:
ការធ្វើតេស្តថា Page Rules មិនមានប្រសិទ្ធិភាពទេ។
Cửa sổ Terminal
Terminal window
បង្វិល Terminal
text
# This should now return 404 (no redirect)

curl -I https://www.example.com/old-location.php


# This should return normal response (no Under Attack mode)

curl -I https://www.example.com/expensive-db-call
Cấu hình của bạn đã được khôi phục thành công. Page Rules được loại bỏ, và cài đặt vùng của bạn trở lại trạng thái trước đó. Kiểm soát phiên bản của Git đảm bảo bạn luôn có thể khôi phục hoặc đảo ngược các thay đổi một cách an toàn.
Your configuration has been successfully reverted. The Page Rules are removed, and your zone settings are back to the previous state. Git's version control ensures you can always recover or revert changes safely.
ការកែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រែប្រ Page Rules ត្រូវបានបាត់បន្ថយនិងការផ្លាស់ប្តូរតំបន់របស់អ្នកត្រូវបានផ្លាស់ប្តូរទៅក្នុងស្ថានភាពមុន។ ការគ្រប់គ្រងកំណែរបស់ Git អនុញ្ញាតឱ្យអ្នកគ្រប់គ្រងប្រសិនបើអ្នកអាចជួសជុលឬដោះស្រាយការផ្លាស់ប្តូរយ៉ាងសុវត្ថិភាពនៅពេលណាមួយ។
json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"/directory/","name":"Directory"}},{"@type":"ListItem","position":2,"item":{"@id":"/terraform/","name":"Terraform"}},{"@type":"ListItem","position":3,"item":{"@id":"/terraform/tutorial/","name":"Tutorials"}},{"@type":"ListItem","position":4,"item":{"@id":"/terraform/tutorial/revert-configuration/","name":"6 – Revert configuration"}}]}

Xem bản đầy đủ trên developers.cloudflare.com (ảnh, tab cấu hình). View the full guide on developers.cloudflare.com (images, config tabs). មើលមគ្គុទ្ទេសក៍ពេញលើ developers.cloudflare.com (រូបភាព, tab កំណត់)។

Tài liệu gốc ↗ Official docs ↗ ឯកសារផ្លូវការ ↗