Cov txheej txheem:

Yuav Ua Li Cas Txhim Kho Kev Txhim Kho Lub Vev Xaib ntawm Localhost: 6 Cov Kauj Ruam
Yuav Ua Li Cas Txhim Kho Kev Txhim Kho Lub Vev Xaib ntawm Localhost: 6 Cov Kauj Ruam
Anonim
Yuav Ua Li Cas Txhim Kho Web Kev Txhim Kho Kev Txhim Kho ntawm Localhost
Yuav Ua Li Cas Txhim Kho Web Kev Txhim Kho Kev Txhim Kho ntawm Localhost

Cov lus qhia no yog qhia koj yuav ua li cas rau nruab Apache, PHP, MySQL ntawm localhost. Tsis tas li yuav teeb tsa nws li cas kom koj muaj qee lub network txias, xws li muaj peev xwm thauj lub hauv paus npe siv lub khoos phis tawj lub npe (https://desktop/index.php), tuaj yeem kho cov ntaub ntawv ntawm lwm lub khoos phis tawj, thiab nkag mus rau cov khoos phis tawj sib txawv los ntawm cov chaw nres nkoj sib txawv thaum siv tus sau lossis IP. For rau cov tib neeg uas nyuam qhuav nkag mus rau hauv kev txhim kho lub vev xaib, qhov no yuav pab koj ua pob khoom. Kuv tau siv qhov teeb tsa no (lossis zoo sib xws) tsawg kawg 2 xyoos. Koj tuaj yeem sau cov vev xaib ntawm localhost, thiab thaum nws ua haujlwm zoo kawg nkaus, xa nws mus rau tus tswv tsev. Hmoov tsis zoo, kuv raug yuam kom ua qhov no ntawm lub tshuab Vista, vim kuv lub khoos phis tawj nrog XP tau teeb tsa lawm, thiab lub khoos phis tawj no muab ACPI yuam kev rau kuv thaum kuv teeb tsa XP.

Kauj ruam 1: Kho Koj Daim Npav Network

Kho koj Daim Npav Network
Kho koj Daim Npav Network

Txhawm rau kom koj tuaj yeem siv qhov no ntawm khoos phis tawj sab nraum koj lub network hauv tsev, (Internet) koj yuav xav tau cov theem no.

Qhov no tsuas ua haujlwm yog tias koj muaj lub router. Nkag mus rau hauv koj lub vaj huam sib luag tswj hwm, Network thiab Chaw sib koom. Qhov twg nws hais tias Kev Sib Txuas, saib mus rau sab xis. Yuav tsum muaj khawm Saib Cov xwm txheej. Nyem rau qhov ntawd. Nco tseg koj tus IP chaw nyob, (IPv4, yog tias koj pom IPv6 ib yam nkaus) koj lub subnet daim npog ntsej muag, lub qhov rooj tsis raug, thiab DNS servers. Tam sim no nias ze, thiab hauv "Qhov Chaw Hauv Cheeb Tsam Txuas Hauv Zos" qhov rai, nyem rau ntawm Properties. Nyem rau TCP/IPv4, tom qab ntawd nyem rau cov khoom. Txheeb xyuas "Siv tus IP chaw nyob hauv qab no", thiab nkag mus rau txhua yam ntaub ntawv koj nyuam qhuav sau tseg. Kev xaiv, koj tuaj yeem siv 4.2.2.1 thiab 4.2.2.2 rau koj li DNS servers. Kuv pom tias lawv hloov kho nrawm heev piv rau lwm DNS servers. Qhov no ua kom koj lub PC khaws tib IP tus hauv zos, thiab DHCP tsis rov muab koj tus IP rau thaum twg koj rov pib dua.

Kauj ruam 2: Kho Koj Tus Router

Configure Koj Router
Configure Koj Router

Hauv koj lub vev xaib, ntaus hauv Default Gateway IP los ntawm cov kauj ruam dhau los. Nws tuaj yeem thov tus password, nws yuav tsis yog. Nws yuav tsum sib txawv rau txhua tus, rau kuv nws yog admin/admin - Lub neej ntawd Linksys password. Yog tias qhov ntawd tsis ua haujlwm, kuv xav txheeb xyuas Google lossis phau ntawv qhia.

Thaum nkag rau hauv, saib rau chaw nres nkoj xa mus. Nkag mus rau hauv IP chaw nyob los ntawm cov kauj ruam dhau los, thiab tus lej chaw nres nkoj tsis raug. Kuv yuav tsis hais qhia chaw nres nkoj 21 lossis 80, vim tias lawv yog FTP thiab HTTP raws tu qauv chaw nres nkoj. Koj tsis xav kom cov tib neeg muaj peev xwm nkag mus rau qhov no, yog li cov lej uas tsuas yog koj paub yog qhov zoo tshaj plaws. Nco ntsoov tias cov txheej txheem tau teeb tsa rau UDP thiab TCP. Qhov no yuav txawv rau txhua tus, tshwj tsis yog koj muaj WRT54G. Koj tsuas yog yuav tsum tshawb nrhiav koj cov chaw rau cov no.

Kauj Ruam 3: Tsis teb los tau: Det Up DNS Fowarding

Yeem: Det Up DNS Fowarding
Yeem: Det Up DNS Fowarding

Yog tias koj muaj hosting ib qhov chaw nrog tus sau, lossis muaj tus tsis muaj npe uas koj xav taw tes rau koj lub khoos phis tawj, koj tuaj yeem ua li ntawd. Koj yuav muaj peev xwm nkag mus tau nws los ntawm qhov chaw nres nkoj koj teeb tsa kawg. Yog tias tsis yog, koj tuaj yeem nkag mus los ntawm koj tus IP. Yog tias koj xav nkag nws los ntawm koj tus IP, tom qab ntawd koj twb tau teeb tsa lawm. Yog tias tsis yog, nyeem ua ntej, koj yuav tsum paub seb koj tus IP yog dab tsi. Sim mus rau DomainTool's IP Checker Yog tias koj muaj tus as khauj hosting uas twb muaj lawm, koj tuaj yeem siv tus sau uas nyob ntawm tus lej ntawd nkag mus rau koj lub tsev apache. Cov lus qhia no yog tias koj tus tswv tsev siv cPanel, thiab yog tias koj muaj tus lej WHM, txwv tsis pub, koj yuav tsum tshawb nrhiav DNS chaw. Yog tias koj tab tom nrhiav tus tswv tsev zoo cPanel, Kuv xav kom ASO Hosting. Hauv WHM, mus rau qeb DNS Cov Haujlwm, thiab nyem rau ntawm ntxiv DNS cheeb tsam. Muab tso rau hauv koj tus IP, thiab ntaus ib qho subdomain ntawm tus sau koj muaj ntawm tus as khauj tam sim no, thaum lub software raug teeb tsa, koj yuav muaj peev xwm nkag tau txhua yam los ntawm subdomain ntawd, siv qhov chaw nres nkoj uas koj tau xaiv. tuaj yeem siv FreeDNS lossis lwm yam kev pabcuam DNS.

Kauj ruam 4: Tau txais Software

Tau lub Software
Tau lub Software

Download xampp los ntawm Apache phooj ywg. Nruab nws ib txwm, thiab nco ntsoov txheeb xyuas "Nruab Apache raws li kev pabcuam", thiab "Txhim Kho MySQL raws li kev pabcuam" Thaum lawv tau teeb tsa ua qhov kev pabcuam, nws cawm koj los ntawm kev siv lawv cov tswj vaj huam sib luag, thiab 2 yog nyob ntawm lub neej ntawd. Nco ntsoov tso cai sib txuas los ntawm txhua lub firewall, thiab windows qhov chaw ruaj ntseg.

Kauj ruam 5: Configure Apache

Configure Apache
Configure Apache

Tam sim no Apache yuav tsum tau teeb tsa kom lub vev xaib hauv paus npe hauv My Documents, thiab nws tuaj yeem nkag mus tau los ntawm qhov chaw nres nkoj tsim nyog. Pib los ntawm kev nkag mus rau hauv koj li My Documents folder, thiab tsim daim nplaub tshev tshiab. Npe nws txhua yam koj xav tau. Kuv xaiv lub vev xaib hauv paus, tab sis ib txwm muaj "www", lossis "public_html" yog tias koj xav tau qee yam txawv. Qhib lub nplaub tshev, thiab nyem rau ntawm qhov chaw nyob bar yam nyob rau saum. Nws yuav tsum muab rau koj qhov chaw nyob tseeb, piv txwv li, kuv yog C: / Web RootNow, nyem tawm ntawm qhov ntawd, thiab nce mus rau ib daim nplaub tshev. Txoj cai nyem rau ntawm daim nplaub tshev uas koj nyuam qhuav tsim, thiab mus rau hauv cov khoom. Mus rau hauv Kev Ruaj Ntseg, tom qab ntawd hloov kho, tom qab ntawd nyem ntxiv. Ntaus txhua tus neeg hauv lub npov, thiab nias ok. Tam sim no, txheeb xyuas tag nrho kev tswj hwm rau Txhua Tus, thiab nias ok. Koj yuav xav luam qhov no. Tam sim no, mus rau koj daim ntawv teev npe xampp, mus rau apache, tom qab ntawd mus rau conf. Qhib httpd.conf hauv notepad, thiab nrhiav "Mloog 80", (Tsis hais nqe lus) Thiab ntxiv lwm kab hauv qab no, hais Mloog Ua raws li tus lej chaw nres nkoj koj tau xaiv hauv kauj ruam 2. Tom ntej no, saib rau "DocumentRoot" (Tsis hais nqe lus). Rho tawm dab tsi hauv nqe lus, tom qab ntawv muab koj qhov chaw tso rau hauv. Koj yuav tsum tau hloov ib qho slashes rov qab slashes (yuav tsum tau hloov mus rau /) Thaum kawg, saib rau "", hloov koj cov ntawv teev npe rau c: /xamppIt yuav tsum nyob ib puag ncig kab 204. Hloov dab tsi hauv nqe lus nrog koj cov npe, ib zaug ntxiv, hloov cov slashes. Tam sim no txuag cov ntawv.

Kauj Ruam 6: Rov Pib Koj Lub Computer, thiab Txaus Siab

Rov pib kho koj lub computer Tam sim no koj tuaj yeem nkag mus rau koj li server hauv ntau txoj kev https:// localhost/(Local PC only) https:// computer name (Local network only) https:// your local ip (Local network only) https:// your external ip: yourport https:// your domain: yourport Kuv yuav tsum tau siv lub siab tawv, txwv tsis pub cov qhia siv tau ua rau nws txuas. Koj tuaj yeem siv php, thiab mysql hauv txhua cov ntaub ntawv uas koj muab tso rau hauv lub vev xaib hauv paus.

Pom zoo: