Tuesday, March 03, 2009 by rain
LAMP frame is a kind of when current software develops important pattern, the L in LAMP represents the operating system Linux of the source, a represents the famousest WWW server, also be the Apache of software opening a source, m opens Mysql of software of source data library primely on behalf of function, and the PHP of network script language that P represents a source, also represent Perl and Python, hind both also be.LAMP of famous software opening a source it is free free software, but function is defeated none at corresponding commercial software---E.g. Apache strong the IIS at Microsoft this is well-known fact---Be in so information field is very popular, having a lot of particular application systems at the same time also is to build on LAMP frame.
1The installation of Apache, configuration
Apache is the uses generally WWW server software in UNIX system.The statistic according to Netcraft (Http://news.netcraft.com/archives/web_server_survey.html) ,Internet is at present medium,Having sexagesimal server of more than hundred minutes is the service that use Apache will come to offer a webpage to browse.Apache can say is the webpage server software that makes number of choose and employ persons maximum on the world at present,It can move in FreeBSD, UNIX, Linux not only,Also can install in Windows operating system.
Apache and FreeBSD are same,There also are many branches on software version,At present stabler version has 1.3 to reach 2.Apache1.3 series development is long already,Already very stable,Won't have great modification again.And Apache2 series is the version with a more active development,It and 1.3 the biggest different depend on pair of multi-line Cheng (the support of Multithreaded) .At present Apache2.0.58 is the mainest stable version,And 2.2.2 condition in still be in development.
Apache software is installed on Debian very convenient, more congener than be being installed on Windows system software is more simple, I use a command to do only decided:
#apt-get Install Apache2
In two version of Apache of the existence in Etch,Apache1 and Apache2, former it is a long-tested stable version,Still have a lot of actual application at present;Latter has a lot of new functions,Be in with when the consideration that all receives,What install above us is latter,The version of installation is Apache2.0.55.
It is a few issues that using middling regular meeting actually to encounter below:
The position of file of 1) configuration:
Be located in in Etch / Etc/apache2/apache2.conf
In other version the position mixes the likelihood the name differs somewhat,Also differ with the position of Apache1.
Be in / below Etc/apache2/ ,Still have two list,It is Mods-available and Mods-enabled respectively,Apparent and former it is offerred module,Latter is the started module that can act well normally.If need to make offerred module,act well,Need does a former symbol to join below latter catalog.
2) is default advocate catalog:
/ Var/www/
After the system has been installed, I am in / a simple Index.html file was kept below Var/www catalog, :
#cat Index.html
This Is A Debian Server
Carry an examination to whether be outputted in the client next correct.
The position of 3) Log fileThe action of Log file is very big,Apache has two Log file,One is all records that land this Apache server,/ Var/log/httpd- Access.log,The file recorded disembarkation Ip,Time,Browser type;Another is file of online and wrong record,/ Var/log/httpd-error.log,This file to debugging Apache parameter be have effect very much.Two files are text file,Can be browsed by the text editor such as Nano, editor,The position that records a file and file name are by Httpd.conf medium corresponding configuration is changed.
3) is started, stop to move with what start Httpd server afresh:Apapche2ctl Start(stop Restart)
This command is more useful,After altering configuration document especially.
The problem of catalog of user of 4) individual:Unlike Apache1,The UserDir in file of important modification configuration,Apache2 regards a module as individual user,Need first:Cd /etc/apache2/mods_enabledLn -s /etc/apache2/mods_available/userdir.conf Userdir.confLn -s /etc/apache2/mods_available/userdir.load Userdir.loadApache2ctl Restart
Revise at the same time advocate configuration file,Annotate drops #UserDir Public_html this,Be in again of user Test advocate catalog / an Index.html file is founded below Home/test,Can browse:Http://yourip/~test.
5) supports the issue of Chinese automatically
The default character set of the webpage has parameter AddDefaultCharset ISO-8859-1
At that time when the browser browses Chinese webpage,Can random code,Need hand moves a setting to code means is GBK or GB2312 ability to show Chinese
Take out annotate,Repair instead AddDefaultCharset GB2312 is OK.
Information of state of 6) Apache
After installing Apache,The system that we need to understand a server ceaselessly the circumstance of each respect.Apache2 is built-in the method that Server-status and Server-info examine server information two kinds.Server-status is to point to server state information,The state that we can know Apache to move at present,Current and the systematic resource that includes to take up, online amount.The module information of the version that Server-info basically is indication Apache, to load.
To use these two functions,We must be revised first / Etc/apache2/apache2.conf.
Want him hand to move above all add an ExtendedStatus On,The information that gets otherwise will be not quite detailed.
Find respectively nextAndThese two paragraphs,two paragraphs inside the annotate in front take out,Set good visit limits of authority.If ignored is safe,Can install Allow From All.
Again:Cd /etc/apache2/mods_enabledLn -s /etc/apache2/mods_available/info.load Info.load
Can visit with Http://hostname/server-info in the browser next.
6) is a few otherer I think to compare important configuration parameter:
ServerRoot: ?he ode shows ? Jin Yang ?of flesh of ? of mother of magpie of ? of collect of regret of cover of leg of Che of Ju of ? of deceive of 4 Mo Mian washing with watercolors stalking or branch
Listen: ?n the IP address that Pache of ` of Huo of Chou of city tiny fragments of stone serves to appoint and port,In order to replace acquiescent cost
DocumentRoot: ?BR> HostnameLookups:Appoint the name that records the client side or IP address
...
Posted in Documents | Tags: