Cov txheej txheem:

Apache puas mloog ntawm ntau lub chaw nres nkoj?
Apache puas mloog ntawm ntau lub chaw nres nkoj?

Video: Apache puas mloog ntawm ntau lub chaw nres nkoj?

Video: Apache puas mloog ntawm ntau lub chaw nres nkoj?
Video: Ntshe yog kuv tsis txawj hlub koj. 10/5/2017 2024, Tej zaum
Anonim

Yog tias koj hais txog ob qho kev qhia saum toj no hauv lub Apache configuration file ces tus Apache server yuav mloog pe ob chaw nres nkoj 80 thiab 8000. Ntau Mloog cov lus qhia yuav raug siv los qhia ntau qhov chaw nyob thiab chaw nres nkoj rau mloog rau.

Yog li ntawd, tus txheej txheem puas tuaj yeem mloog ntawm ntau qhov chaw nres nkoj?

1 Teb. Yog, ib leeg txheej txheem tuaj yeem mloog ntawm ntau qhov chaw nres nkoj , ib yam li 80 + 443 ua tiav. Feem ntau koj muaj ib leeg txheej txheem thiab tom qab ntawd ntau threads tuav cov kev thov thaum lawv tab tom tuaj.

Ib tug kuj nug, Kuv yuav ua li cas thiaj tau Apache mloog ntawm chaw nres nkoj 8080? Configure Apache Lub Vev Xaib kom Siv Ntau Qhov Chaw

  1. Cov ntsiab lus: Hauv kuv qhov piv txwv, kuv tau khiav Apache ntawm Chaw nres nkoj 80 ntawm ib tus IP.
  2. Kauj ruam 1: Qhib Apache configuration File httpd.conf (ntawm kuv lub qhov rais host, nws nyob ntawm no: "c: Program FilesApache GroupApache2conf")
  3. Kauj ruam 2: Nrhiav kab: Mloog 80 thiab ntaus Mloog 8080 ntawm kab tom ntej:

Tsis tas li ntawd, Apache siv cov chaw nres nkoj twg?

Qhov chaw nres nkoj siv los ntawm Apache yog 80. Saib rau tag nrho koj cov chaw nres nkoj siv nrog Netstat (integrated to XAMPP Control Panel). Tom qab ntawd koj tuaj yeem pom tag nrho cov chaw nres nkoj siv thiab ntawm no peb pom tias 80 chaw nres nkoj twb tau siv los ntawm System. Xaiv tus lej chaw nres nkoj dawb (8012, rau qhov piv txwv no).

Kuv yuav ntxiv ntau tus tswv virtual hauv Apache li cas?

Configure Virtual Host hauv Apache los tuav ntau lub npe

  1. Nkag mus rau Apache HTTP Server.
  2. Mus rau apache conf qhov chaw. (hauv default installation - koj yuav pom nws ntawm no /etc/httpd/conf/httpd.conf)
  3. Siv ib qho thaub qab ntawm httpd.conf cov ntaub ntawv.
  4. Tsim ib lub thawv VirtualHost zoo li hauv qab no kuv tau ua rau ob lub npe.

Pom zoo: