Integration ya Cloudflare
Umuhuku
Cloudflare ni umuyobozi w'ubwoko bw'ubwoko bwa content (CDN) n'umuyobozi w'ubwoko bw'ubwoko (security provider) uwohushya no gukomeza uburenganzira mu buryo bwo gutera ku website. Iyi integration ituma uburyo bwo gukoresha domain byiza mu buryo bwa Ultimate Multisite n'Cloudflare, cyane ku gihe cyo gukora subdomain multisite installations.
Amakuru
- Gukora subdomain mu Cloudflare
- Uburyo bw'ubwoko (Proxied) bufungwa
- Gukoresha DNS records
- Uburyo bwo kubona DNS records mu dashboard ya Ultimate Multisite
Amakuru y'Ubwihutiriramo
Icyo kintu cyiza cyabone mu file wp-config.php yawe:
define('WU_CLOUDFLARE_API_KEY', 'your_api_key');
define('WU_CLOUDFLARE_ZONE_ID', 'your_zone_id');
Inama y'Ubwihutiriramo
1. Gukoresha API Key yawe ya Cloudflare
- Yitera ku dashboard yawe ya Cloudflare
- Gukora kuri "My Profile" (gukoresha email yawe mu kigwaramo cy'ibyo byo ku gice cy'umunsi)
- Gukoresha "API Tokens" ku menu
- Kora API token yashya yakoresheje amakuru yizero:
- Zone.Zone: Read (Gusobanura/Gushobora kubona)
- Zone.DNS: Edit (Gusobanura/Gukora)
- Gukopya API token yawe
2. Gukoresha Zone ID yawe
- Mu dashboard yawe ya Cloudflare, gukoresha domain uwo wumva wumva gukoresha
- Zone ID yishobora kubone mu tab "Overview", mu kigwaramo cy'ibyo byo ku gice cy'umunsi ku kinyuma mu gihe cyo "API"
- Gukopya Zone ID
3. Gutera Amakuru mu wp-config.php
Gusobanura amakuru yizero mu file wp-config.php yawe:
define('WU_CLOUDFLARE_API_KEY', 'your_api_token');
define('WU_CLOUDFLARE_ZONE_ID', 'your_zone_id');
4. Gutera Integration
- Mu admin yawe ya WordPress, gukoresha Ultimate Multisite > Settings
- Gukora ku tab "Domain Mapping" (Gukoresha uburyo bwo gutera domain)
- Gukora ku kinyuma ku gihe cyo "Host Integrations"
- Gutera integration ya Cloudflare
- Gukoresha "Save Changes"
Icyo Kintu Cyiza Cyabone
Umuco w'ubwoko (Subdomain Management)
Iyo hari website yashya itangwa mu subdomain multisite installation:
- Icyemezo y'ubwumwebwe yitangira umusho ku API ya Cloudflare kugira record CNAME kuri subdomain.
- Subdomain irashyizwe mu buryo bwo kuboneka (proxied) muri Cloudflare mu gihe cyiza (iki gice cyashobora guhindurwa n'amasezerano).
- Iyo uburyo bwo kuboneka (site) bishoborwe, igikorwa cyitangira kigira umusho ku subdomain kuri Cloudflare.
Ubwumwebwe bw'DNS Record
Icyitangira cyitangira yashobora gukunda DNS record mu admin ya Ultimate Multisite bikoresha:
- Gukoresha DNS records by'uko muri Cloudflare
- Kubona n'ubwo record ni byashyizwe mu buryo bwo kuboneka (proxied) cyangwa si
- Kugira ibindi by'ingenzi ku DNS records
Cloudflare Custom Hostnames
Cloudflare Custom Hostnames (yo yari itangira ari "Cloudflare for SaaS") ni ikoranabuhanga ry'Cloudflare ryashobora kugira ngo abakoresha bako domain cyangwa imyitwarire yabo yashyizwe mu SSL muri network ya multisite yawe. Ni uburyo bwiza bwo gukoresha multisite yashyizwe ku domain (domain-mapped) yakoresheje Cloudflare, kuko Cloudflare igira uburyo bwo gutangira no guhindura SSL certificate kuri kila domain y'ibyo byose mu buryo bw'umwihariko.
Uburyo bwo gukunda ibintu ku itangira (How it differs from the standard Cloudflare integration)
| Itangira ry'standard integration | Cloudflare Custom Hostnames | |
|---|---|---|
| Uburyo | Gukora DNS records by'uko mu subdomain | Guhindura domain (mapped) yashyizwe mu SSL ya Cloudflare |
| Buri gukoresha | Multisite yashyizwe ku subdomain | Multisite yashyizwe ku domain (domain-mapped) |
| SSL | Gukora mu gihe cyiza (Handled separately) | Kugirwa n'Cloudflare mu buryo bw'umwihariko |
Guhindura Cloudflare Custom Hostnames
- Iki n'ubwo mu dashboard yawe ya Cloudflare, yemeza zone ya domain yawe yakomeye (main domain).
- Gukora ku SSL/TLS > Custom Hostnames.
- Shobora kugabanya origin (fallback origin) uburyo bwo gushyira umwujiza w'ubwoko (server's IP cyangwa hostname).
- Ku gihe cyose cyo domain yawe yashyiramo mu Ultimate Multisite, ugomba gushyira entry ya Custom Hostname mu Cloudflare. Shobora gukora uwo muntu mu buryo bwo gukoresha Cloudflare API.
- Iki gice cy'uko Cloudflare igira no gukoresha (issues) no gufata (renews) TLS certificates ku gihe cyose cyo Custom Hostname, mu gihe DNS yawe yashyiramo mu rwego rwawe (network).
Kugira uburyo bwo gushobora gukoresha API yakuriye, ugomba gushakira Cloudflare Custom Hostnames documentation.
Kugira ngo Ultimate Multisite v2.6.1, uwo gice bishobora guhagarirwa nk'Cloudflare Custom Hostnames mu gihe cyose cyo plugin na ibindi byemezo (labels). Icyo kera cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cyo mu gihe cy
Icyo mu gukoresha Proxying
- Nta wumva subdomains kugira ngo zishobore kwirindutse (proxied), ukenya
wu_cloudflare_should_proxyfilter. - Urugero, uburyo bwo gukoresha proxying guhindura ko ibintu byiza bitera neza (gukora) mu gihe cyose (e.g., uburyo bwo gukora ibyemezo by'ubwoko bw'administration kuri WordPress).
- Nshobora kugufasha gukoresha Page Rules za Cloudflare kugira ngo ubwoko bwa cache (cache) buvugire ku gihe cyose (bypass the cache) mu gihe cyo gukora ibyemezo by'ubwoko bw'administration.