下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
Linux網(wǎng)絡(luò)嵌入架構(gòu)工程師培訓(xùn)班二十三1WebWeb還可以提供與客戶之間的信息交互,提本節(jié)課詳細(xì)講解Apache的源代碼安裝以及基本配置2、說明tar-zxvfhttpd-2.2.9.tar.gz //現(xiàn)在是2.2.9 ./configuremake##ThisisthemainApacheHTTPserverconfigurationfile. Itcontainsthe#configurationdirectivesthatgivetheserveritsinstructions.#See<URL:>fordetailedinformation.#Inparticular,see#<URL:#foradiscussionofeachconfigurationdirective.#DoNOTsimplyreadtheinstructionsinherewithout#whattheydo. They'rehereonlyashintsorreminders. Ifyouareunsure#consulttheonlinedocs.Youhavebeenwarned.##Configurationandlogfilenames:Ifthefilenamesyouspecifyformany#oftheserver'scontrolfilesbeginwith"/"(or"drive:/"forWin32),the#serverwillusethatexplicitpath. Ifthefilenamesdo*not*begin#with"/",thevalueofServerRootisprepended--so"logs/foo_log"#withServerRootsetto"/usr/local/apache"willbeinterpretedbythe#serveras"/usr/local/apache/logs/foo_log".##ServerRoot:Thetopofthedirectorytreeunderwhichtheserver's#configuration,error,andlogfilesarekept.##Donotaddaslashatofthedirectory Ifyou#ServerRootatanon-localdisk,besuretopointtheLockFiledirective#atalocaldisk. IfyouwishtosharethesameServerRootformultiple#httpddaemons,youwillneedtochangeatleastLockFileandPidFile.ServerRoot##Listen:AllowsyoutobindApachetospecificIPaddressesand/or#ports,insteadofthedefault.Seealsothe<VirtualHost>#directive.#ChangethistoListenonspecificIPaddressesasshownbelowto#preventApachefromglommingontoallboundIPaddresses.##ListenListen##DynamicSharedObject(DSO)##TobeabletousethefunctionalityofamodulewhichwasbuiltasaDSOyou#havetoplacecorresponding`LoadModule'linesatthislocationsothe#directivescontainedinitareactuallyavailable_before_theyareused.#Staticallycompiledmodules(thoselistedby`httpd-l')donotneed#tobeloadedhere.##LoadModulefoo_modulemodules/mod_foo.so<IfModule<IfModule!mpm_winnt_module>#Ifyouwishhttpdtorunasadifferentuserroup,youmustrun#httpdasrootinitiallyanditwillswitch.##User/Group:Thename(or#number)oftheuser/grouptorunhttpdas.#Itisusuallygoodpracticetocreateadedicateduserandgroupfor#runninghttpd,aswithmostsystemservices.UserdaemonGroupdaemon#'Main'serverconfiguration#Thedirectivesinthissectionsetupthevaluesusedbythe'main'#server,whichrespondstoanyrequeststhataren'thandledbya#<VirtualHost>definition. Thesevaluesalsoprovidedefaultsfor#any<VirtualHost>containersyoumaydefinelaterinthefile.##Allofthesedirectivesmayappearinside<VirtualHost>containers,#inwhichcasethesedefaultsettingswillbeoverriddenforthe#virtualhostbeingdefined.##ServerAdmin:Youraddress,whereproblemswiththeservershouldbe ed.Thisaddressappearsonsomeserver-generatedpages,such#aserror s.e.g.adm###ServerNamegivesthenameandportthattheserverusestoidentify#Thiscanoftenbedeterminedautomatically,butwe mendyouspecify#itexplicitlytopreventproblemsduringstartup.##Ifyourhostdoesn'thavearegisteredDNSname,enteritsIPaddresshere.# Root:Thedirectoryoutofwhichyouwillserve s.Bydefault,allrequestsaretakenfromthisdirectory,but#symboliclinksandaliasesmaybeusedtopointtootherlocations.#Root##EachdirectorytowhichApachehasaccesscanbeconfiguredwithrespect#towhichservicesandfeaturesareallowedand/ordisabledinthat#directory(anditssubdirectories).#,weconfigurethe"default"tobeaveryrestrictivesetof#features.#<DirectoryOptionsFollowSymLinksAllowOverrideNoneOrderdeny,allowDenyfrom##Notethatfromthispointforwardyoumustspecifically#particularfeaturestobeenabled-soifsomething'snotworkingas#youmightexpect,makesurethatyouhavespecificallyenabledit#below.###Thisshouldbechangedtowhateveryouset Rootto.<Directory##PossiblevaluesfortheOptionsdirectiveare"None","All",#oranycombinationof: IndexesIncludesFollowSymLinksSymLinksifOwnerMatchExecCGIMultiViews#Notethat"MultiViews"mustbenamed*explicitly*"OptionsAll"#doesn'tgiveittoyou.##TheOptionsdirectiveisbothcomplicatedandimportant. Pleasesee##formoreinformation.OptionsIndexes##AllowOverridecontrolswhatdirectivesmaybeplacedin.htaccessfiles.#Itcanbe"All","None",oranycombinationofthekeywords: OptionsFileInfoAuthConfigLimit##Controlswhocangetstufffromthisserver.Orderallow,denyAllowfromall#DirectoryIndex:setsthefilethatApachewillserveifadirectory#isrequested.#<IfModuleDirectoryIndexindex.html##Thefollowinglinesprevent.htaccessand.htpasswdfilesfrombeing#viewedbyWebclients.#<FilesMatch"^\.ht">Orderallow,denyDenyfromall##ErrorLog:Thelocationoftheerrorlog#IfyoudonotspecifyanErrorLogdirectivewithina<VirtualHost>#container,errormessagesrelatingtothatvirtualhostwillbe#loggedhere. Ifyou*do*defineanerrorlogfilefora<VirtualHost>#container,thathost'serrorswillbeloggedthereandnothere.#ErrorLog##LogLevel:Controlthenumberofmessagesloggedtotheerror_log.#Possiblevaluesinclude:debug,info,notice,warn,error,crit,#alert,emerg.LogLevel<IfModulelog_config_module>#Thefollowingdirectivesdefinesomeformatnicknamesforusewith#aCustomLogdirective(seebelow).#LogFormat"%h%l%u%t\"%r\"%>s%b\"%{Referer}i\"\"%{User-Agent}i\""combinedLogFormat"%h%l%u%t\"%r\"%>s%b"common<IfModule#Youneedtoenablemod_logio.ctouse%IandLogFormat"%h%l%u%t\"%r\"%>s%b\"%{Referer}i\"\"%{User-Agent}i\"%I%O"##Thelocationandformatoftheaccesslogfile(CommonLogfileFormat).#Ifyoudonotdefineanyaccesslogfileswithina<VirtualHost>#container,theywillbeloggedhere. Contrariwise,ifyou*do*#defineper-<VirtualHost>accesslogfiles,transactionswillbe#loggedthereinand*not*inthisfile.CustomLog"logs/access_log"##Ifyoupreferalogfilewithaccess,agent,andrefererinformation#(CombinedLogfileFormat)youcanusethefollowing##CustomLog"logs/access_log"<IfModulealias_module>#Redirect:Allowsyoutolclientsabout sthatusedto#existinyourserver'snamespace,butdonotanymore.Theclient#willmakeanewrequestforthe atitsnewlocation.##Redirectpermanent/foo ##Alias:Mapswthsintofilesystempathsandisusedto#accesscontentthatdoesnotliveunderthe #Example:#Alias/wth/full/filesystem/path#Ifyouincludeatrailing/on/wththentheserverwill#requireittobepresentintheURL. Youwillalsolikely#needtoprovidea<Directory>sectiontoallowaccessto#thefilesystempath.##ScriptAlias:Thiscontrolswhichdirectoriescontainserverscripts.#ScriptAliasesareessentiallythesameasAliases,exceptthat#sinthedirectoryaretreatedasapplications#runbytheserverwhenrequestedratherthanasssenttothe#client. Thesamerulesabouttrailing"/"applytoScriptAlias#directivesastoAlias.<IfModulecgid_module>#ScriptSock:Onthreadedservers,designatethepathtotheUNIX#socketusedtocommunicatewiththeCGIdaemonofmod_cgid.#Scriptsock#"/usr/local/apache/cgi-bin"shouldbechangedtowhateveryourScriptAliased#CGIdirectoryexists,ifyouhavethatconfigured.#<Directory"/usr/local/apache/cgi-bin">AllowOverrideNoneOptionsNoneOrderallow,denyAllowfromall##DefaultType:thedefaultMIMEtypetheserverwillusefor#ifitcannototherwisedetermineone,suchasfromfilenameextensions.#IfyourservercontainsmostlytextorHTML s,"text/plain"is#agoodvalue. Ifmostofyourcontentisbinary,suchasapplications#orimages,youmaywanttouse"application/octet-stream"insteadto#keepbrowsersfromtryingtodisplaybinaryfilesasthoughtheyare#text.#<IfModulemime_module>#TypesConfigpointstothefilecontainingthelistofmapsfrom#filenameextensiontoMIME-type.###AddTypeallowsyoutoaddtooroverridetheMIMEconfiguration#filespecifiedinTypesConfigforspecificfiletypes.##AddTypeapplication/x-gzip.tgz#AddEncodingallowsyoutohavecertainbrowsers #informationonthefly.Note:Notallbrowserssupportthis.# press.Z#AddEncodingx-gzip.gz.tgz#IftheAddEncodingdirectivesabovearecommented-out,thenyou#probablyshoulddefinethoseextensionstoindicatemediatypes:# press##AddHandlerallowsyoutomapcertainfileextensionsto"handlers":#actionsunrelatedtofiletype.Thesecanbeeitherbuiltintotheserver#oraddedwiththeActiondirective(seebelow)##TouseCGIscriptsoutsideofScriptAliased#(Youwillalsoneedtoadd"ExecCGI"tothe"Options"directive.)#AddHandlercgi-script#Fortypemaps(negotiated#AddHandlertype-map##Filtersallowyoutoprocesscontentbeforeitissenttotheclient.#Toparse.shtmlfilesforserver-sideincludes#(Youwillalsoneedtoadd"Includes"tothe"Options"directive.)#AddTypetext/html.shtml#AddOutputFilterINCLUDES.shtml##Themod_mime_magicmoduleallowstheservertousevarioushintsfromthe#contentsofthefileitselftodetermineitstype. TheMIMEMagicFile#directivelsthemodulewherethehintdefinitionsarelocated.#MIMEMagicFile##Customizableerrorresponsescomeinthreeflavors:#1)plaintext2)localredirects3)externalredirects##Some#Error500"Theservermadeaboo 404 404"/cgi- 402http ##EnableMMAPandEnableSendfile:Onsystemsthatsupportit,#memory-maporthesendfilesyscallisusedtodeliver#files. Thisusuallyimprovesserverperformance,butmust#beturnedoffwhenservingfrom
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年個(gè)人車位出租合同樣本(2篇)
- 服裝公司辦公室裝修合同
- 商業(yè)地產(chǎn)租賃居間協(xié)議樣本
- 保健食品配送合同范本
- 2025年度信息安全保密技術(shù)合作開發(fā)合同
- 人工智能監(jiān)理居間合同
- 服裝批發(fā)市場物流合同
- 橡膠行業(yè)融資居間合同范例
- 2025年度安防產(chǎn)品區(qū)域代理及市場推廣合同
- 2025年度信息安全保密合作協(xié)議
- 銀行金融機(jī)構(gòu)銀行金融服務(wù)協(xié)議
- GB/T 27697-2024立式油壓千斤頂
- 《消防機(jī)器人相關(guān)技術(shù)研究》
- 游泳館安全隱患排查
- 《媒介社會(huì)學(xué)》課件
- 項(xiàng)目設(shè)計(jì)報(bào)告范文高中
- 成人手術(shù)后疼痛評(píng)估與護(hù)理團(tuán)體標(biāo)準(zhǔn)
- zemax-優(yōu)化函數(shù)說明書
- 2021年《民法典擔(dān)保制度司法解釋》適用解讀之擔(dān)保解釋的歷程
- 第02講 導(dǎo)數(shù)與函數(shù)的單調(diào)性(學(xué)生版)-2025版高中數(shù)學(xué)一輪復(fù)習(xí)考點(diǎn)幫
- 《醫(yī)療機(jī)構(gòu)工作人員廉潔從業(yè)九項(xiàng)準(zhǔn)則》專題解讀
評(píng)論
0/150
提交評(píng)論