Ubuntu under the Apache configuration and detailed "original"

Source: Internet
Author: User
Tags apache php
<span id="Label3"></p><p><p><span style="font-family:‘微软雅黑‘, ‘Microsoft YaHei‘;font-size:20px;">Nonsense not much to say, directly on the command:</span></p></p><p><p><span style="font-family:‘微软雅黑‘, ‘Microsoft YaHei‘;font-size:20px;">sudo apt-get install apache2</span></p></p><p><p><span style="font-family:‘微软雅黑‘, ‘Microsoft YaHei‘;font-size:20px;">After successful installation, you can see the 000-default.conf file in The/etc/apache2/sites-available directory, which is an Apache configuration file, and the other profile is/etc/apache2/ apache2.conf, Note To restart the service with the command sudo service apache2 Restart after any settings have been Modified. <span style="color:rgb(68,68,68);line-height:25px;font-family:‘微软雅黑‘, ‘Microsoft YaHei‘;font-size:20px;">Apache is a modular server, which means that only the modules that implement the most basic functionality are included in the Core. The extension function can be dynamically loaded as a module. By default, only the modules of the base group are compiled into the Server. </span></span></p></p><p><p><span style="font-family:‘微软雅黑‘, ‘Microsoft YaHei‘;font-size:20px;"><br></span></p></p><p><p><span style="font-family:‘楷体‘, ‘楷体_GB2312‘, SimKai;font-size:20px;">Version 2.2:</span></p></p><p><p><span style="font-family:‘楷体‘, ‘楷体_GB2312‘, SimKai;font-size:20px;">/etc/apache2/sites-enabled/default Modify the DocumentRoot and modify the directory tag that corresponds to the original path (the default is/var/www), which is changed to two Places. DocumentRoot the end of the add/, directory tag to add/.<br></span></p></p><p><p><span style="font-family:‘楷体‘, ‘楷体_GB2312‘, SimKai;font-size:20px;">Version 2.4: (i am here under the 2.4 Version)</span></p></p><p><p><span style="font-family:‘楷体‘, ‘楷体_GB2312‘, SimKai;font-size:20px;">/etc/apache2/sites-enabled/000-default.conf Modify documentroot,<br></span></p></p><p><p><span style="font-family:‘楷体‘, ‘楷体_GB2312‘, SimKai;font-size:20px;">/etc/apache2/apache2.conf Modify the corresponding directory label</span></p></p><p><p><span style="font-family:‘楷体‘, ‘楷体_GB2312‘, SimKai;font-size:20px;">(the configuration file name under the two versions of sites-enabled may be different from the example here, each distribution will have its own Name)</span></p></p><p><p><span style="font-family:‘楷体‘, ‘楷体_GB2312‘, SimKai;font-size:20px;"><br></span></p></p><p><p><span style="font-family:‘楷体‘, ‘楷体_GB2312‘, SimKai;font-size:20px;">650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M02/84/97/wKiom1eVt0vxSTo_AABJrQc8Iro876.png "title=" 123. PNG "alt=" wkiom1evt0vxsto_aabjrqc8iro876.png "/></span></p></p><p><p><span style="font-family:‘微软雅黑‘, ‘Microsoft YaHei‘;font-size:20px;">Here you can find these files in the Apache2 directory:</span></p></p><p><p><span style="font-family:‘微软雅黑‘, ‘Microsoft YaHei‘;font-size:20px;"><br></span></p></p><p><p><span style="font-family:‘微软雅黑‘, ‘Microsoft YaHei‘;font-size:20px;"></span></p></p><p><p><span style="font-family:‘楷体‘, ‘楷体_GB2312‘, SimKai;font-size:20px;">/etc/apache2/mods-available/indicates the available modules, the load suffix holds the path to the module, and the Conf suffix indicates the configuration of the Module.</span></p></p><p><p><span style="font-family:‘楷体‘, ‘楷体_GB2312‘, SimKai;font-size:20px;">/etc/apache2/mods-enabled/represents the enabled module, and the master profile apache2.conf references all files to this directory. This directory is full of soft links, can be seen ls-l. The corresponding module is enabled when the file under/etc/apache2/mods-available/is soft-linked to/etc/apache2/mods-enabled/. The Ifmodule XXX tag in the configuration file indicates that the XXX module is enabled before adding the parameters inside<br></span></p></p><p><p><br></p></p><p><p><span style="font-family:‘微软雅黑‘, ‘Microsoft YaHei‘;font-size:18px;">(intermediate Apache specific configuration There are some details being learned ... Follow-up will continue to update ~)</span></p></p><p><p><br></p></p><p><p><span style="font-size:20px;font-family:‘微软雅黑‘, ‘Microsoft YaHei‘;">sudo apt-get install LIBAPACHE2-MOD-PHP5<br></span></p></p><p><p><span style="font-size:20px;font-family:‘微软雅黑‘, ‘Microsoft YaHei‘;">Install Apache PHP function module, Then you can write a simple PHP page in the var/www/directory to test the success, note to restart the next Apache service to make the previous settings take Effect.<br></span></p></p><span style="font-size:20px;font-family:‘微软雅黑‘, ‘Microsoft YaHei‘;"><span style="font-size:20px;font-family:‘微软雅黑‘, ‘Microsoft YaHei‘;"></span></span><p><p><br></p></p><p><p><span style="font-size:20px;font-family:‘微软雅黑‘, ‘Microsoft YaHei‘;">sudo apt-get install</span> <span style="font-size:20px;font-family:‘微软雅黑‘, ‘Microsoft YaHei‘;">MySQL</span> <span style="font-size:20px;font-family:‘微软雅黑‘, ‘Microsoft YaHei‘;">-server</span></p></p><p><p><span style="font-size:20px;font-family:‘微软雅黑‘, ‘Microsoft YaHei‘;">Install the MySQL service.</span></p></p><p><p><br></p></p><p><p><span style="font-size:20px;font-family:‘微软雅黑‘, ‘Microsoft YaHei‘;">sudo apt-get install Libapache2-mod-auth-mysql<br></span></p></p><p><p><span style="font-size:20px;font-family:‘微软雅黑‘, ‘Microsoft YaHei‘;">Let apache, PHP support MySQL</span></p></p><p><p><br></p></p><p><p><span style="font-size:20px;font-family:‘微软雅黑‘, ‘Microsoft YaHei‘;">Last APACHE+MYSQL+PHP5 installation succeeded</span><br></p></p><p><p>This article is from the "theaurorasec" blog, make sure to keep this source http://aurorasec.blog.51cto.com/9752323/1829666</p></p><p><p>Ubuntu under the Apache configuration and detailed "original"</p></p></span>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.