Skip to content
WasFor
Kgutlela hae
Litokomane/Rea qala

Ho qala ka potlako

Leqephe lena le tsamaea ka phepelo e felletseng ea pele: kenya, kena, theha sebaka sa marang-rang, ntlha ea DNS, fana ka SSL, khetha nako ea ho sebetsa ea PHP, eketsa database le ho hlophisa bekapo. Lebella metsotso e ka bang leshome ka mor'a ho kenya.

1. Kena

Bula phanele ea URL e hatisitsoeng ke setsi. Sebelisa ak'haonte ea motsamaisi e entsoeng ho wizate ea pele. Haeba ha o so kentse, qala ka Installation.

2. Etsa sebaka sa marang-rang

  1. Eya ho Liwebsaete → Etsa sebaka .
  2. Kenya sebaka sa mantlha, mohlala app.example.com.
  3. Khetha tokomane ea root kapa u amohele tsela e hlahisoang tlas'a /home/<account>/sites/.
  4. Khetha mofuta oa PHP. Khetha mofuta o mocha ka ho fetesisa o tšehetsoeng ke kopo ea hau.
  5. Theha sebaka.

Phanele e ngola vhost, e theha tokomane ea root ebe e kenya seva sa webo bocha. index.php e tiisa hore sebaka sena se teng.

bash
curl -I http://app.example.com
# HTTP/1.1 200 OK

3. Ntlha ea DNS

Theha rekoto ea A (le AAAA haeba u sebelisa IPv6) bakeng sa sebaka sa marang-rang, u supa IP ea sechaba ea seva.

text
app.example.com.   300   IN   A      203.0.113.10
app.example.com.   300   IN   AAAA   2001:db8::10

Haeba domain's DNS e amoheloa ka hare ho WasFor, eketsa rekoto tlas'a Domains → DNS ho e-na le ho mo ngolisi oa hau.

4. Taba ea SSL

  1. Bula sebaka sena → SSL.
  2. Khetha Let's Encrypt.
  3. Kenyelletsa www kapa li-aliases tse ling ha ho hlokahala.
  4. Fana ka setifikeiti.

Phanele e phethela phephetso ea HTTP-01 mme e kenya setifikeiti ka nchafatso ea othomathiki. Qobella HTTPS ha setifikeiti se sebetsa.

Ho phatlalatsoa ha DNS ho ka nka metsotso e seng mekae. Haeba tlhahiso e hloleha, netefatsa hore domain name e ikemiselitse ho seva sena le hore port 80 ea fumaneha.

5. Fetola PHP

Bula sebaka sa marang-rang → PHP tab. Li-setting li futsitsoe ho tsoa ho profaele ea seva ho fihlela u li tlola.

TataisoBoleng bo tloaelehilengLintlha
memory_limit256M64M–1G
max_execution_time12030–300 metsotsoana
upload_max_filesize64M2M–512M
post_max_size64ME tlameha ho ba ≥ boholo ba ho kenya
max_input_vars30001000–10000
date.timezoneUTCSebaka sefe kapa sefe sa nako sa IANA

Liphetoho li sebetsa ha PHP-FPM e kenya hape 'me li bonahala hang-hang phanele ea tlhophiso e sebetsang. Sheba nako ea ho sebetsa ea PHP bakeng sa konteraka e felletseng.

6. Kenya polokelongtshedimosetso

  1. Eya ho Bobolokelo ba data → Theha database .
  2. Khetha lebitso le mosebelisi ea inehetseng oa database.
  3. Kopitsa phasewete e hlahisitsoeng ho .env ea sesebelisoa sa hau.
ini
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=app_prod
DB_USERNAME=app_user
DB_PASSWORD=<generated>

phpMyAdmin e fumaneha skrineng se le seng ka ho tobetsa hanngoe feela.

7. Kenya kopo

Kenya lifaele le mookameli oa faele, kapa u hule ho tloha Git tlas'a Liwebsaete → Deploy . Mongolo o fokolang oa tokollo:

bash
cd /home/acme/sites/app.example.com
git pull --ff-only
composer install --no-dev --optimize-autoloader
php artisan migrate --force
php artisan config:cache

8. Etsa kemiso ea bekapo

Bula Lipolokelo → Etsa kemiso :

  • Scope — lifaele tsa sebaka, datha, kapa ka bobeli.
  • Hangata - letsatsi le letsatsi ka 03:00 nako ea seva.
  • Ho boloka - 7 letsatsi le letsatsi, 4 beke le beke.
  • Sebaka — disk ea lehae kapa bakete e sebeletsanang le S3.

Matha mosebetsi hang ka letsoho ho netefatsa lintlha le ho khutlisetsa faele e nyane pele u itšetleha ka eona.

Lethathamo la tlhahlobo ea pele

MohatoE entsoe neng
Panel e fumaneha ho feta HTTPSLeqephe la ho kena le tletse ka setifikeiti se nepahetseng
Sebaka se rarollacurl -I https://app.example.com e khutlisa 200
SSL nchafatso ea boits'oaroSetifikeiti se bonts'a letsatsi la nchafatso
PHP e fetisitseSebopeho se sebetsang se bonts'a litekanyetso tsa hau
Database e fumanehaApp e hokahana le mosebelisi ea inehetseng
Kopo e netefalitsoeHo khutlisa faele e le 'ngoe hoa atleha

Tsoela pele ka Tlhahlobo ea Phanele ea Basebelisi bakeng sa ts'ebetso ea letsatsi le letsatsi.

E qetetse ho ntlafatsoa: 2026-12-01