Kamoo U ka Behang DNS Alias ​​le Apache

Ho Sebedisa Matlo a mangata ho tswa ho Apache Web Server

Ho bonolo ho theha li-DNS selekane le seva sa websaete sa Apache. Seo se bolelang ke hore haeba u na le marang-rang a marang-rang kapa 100 u ka li beha kaofela ho isa litsing tse fapaneng tsa lisebelisoa tsa hau tsa hau le ho li amohela kaofela.

Bothata: Ho thata

Nako e Hlokehang: metsotso e 10

Ho beha DNS Likhopotso

  1. Etsa lengolo ho seva sa hau sa Apache.
    Etsa bonnete ba hore o kenya lenaneo ka har'a li-directory tsa hau tsa hau ea hau, mme eseng sebakeng leha e le sefe mochine oa hau. Ka mohlala, boholo ba li -websaete tsa se - server tsa Apache li fumaneha fensetereng ea htdocs. Ka hona, bopa fensetere e ka tlaase mona ho amohela lifaele tsa hau tsa domain. Ke khopolo e ntle ea ho beha faele ea index.html lenaneng e le hore u ka e hlahloba hamorao.
  1. Ka tlhahiso ea 1 ea Apache, fetola faele ea apache.conf 'me u fumane karolo ea vhosts (e fumanehang ka ho fetisisa).
    Ka tlhahiso ea 2 ea Apache, fetola file ea vhosts.conf.
    Hangata tsena li fumaneha mochineng oa boitsebiso ho seva sa hau sa hau, eseng sebakeng sa htdocs.
  2. Ho sa tsotellehe phetolelo efe kapa efe, fetola karolo ea vhosts ho eketsa mocha o mocha:
    IP_ADDRESS>
    ServerName DOMAIN NAME
    DocumentRoot FULL_PATH_TO_DIRECTORY
    Fetola likarolo tse totobetseng tsa khoutu e ka holimo ho tlhahisoleseding e tobileng ho sebaka sa hau le sebaka sa hau.
  3. Qala hape Apache.
  4. Fetola faele ea hau ea lebitso.conf
  5. Kenya kenyelletso bakeng sa domain:
    libaka " DOMAIN" KA {
    mongolo oa mofuta;
    faele " LOCATION_OF_DB_FILE ";
    lumella-fetisetsa { IP_ADDRESS ; };
    };
    Fetola likarolo tse totobetseng tsa khoutu e ka holimo ho tlhahisoleseding e tobileng ho sebaka sa hau le sebaka sa hau.
  6. Etsa faele ea db bakeng sa domain
    Tsela e bonolo ka ho fetisisa ke ho kopitsa lifaele tse ling tsa db mme o eketsa domainbo ea hau e ncha.
  7. Khutlisetsa DNS ea hau hape
  8. Leka domain name ea hau ho sebadi sa hau sa marang-rang.
    E ka nka lihora tse 'maloa hore DNS ea hau e phatlalatsoe, empa hafeela u ntse u bua ka DNS ea hau ea sebakeng seo u lokela ho lekoa hang-hang.

Seo U se Hlokang