Install and configure apache2 in Ubuntu 12.04

Source: Internet
Author: User

Apache2 Installation

1. We use the root account for installation. First switch to the root account and enter the following command:

Sudo Su

2 install apache2

Apt-Get install apache2

Enter your server IP address in the browser, such as http: // 10.103.30.201. Check whether apache2 works. If it works !), It indicates that you have already worked.

The default document root directory of Apache in Ubuntu is/var/www., Configuration file/etc/apache2/apache2.conf, additional configuration storage subdirectory/etc/apache2

 

Apache2 Configuration

1. Restart the server:/Etc/init. d/apache2 restart

2. Disable The apache2 server:/etc/init. d/apache2 stop

3. Enable The apache2 server:/etc/init. d/apache2 start

4. Modify the default document root directory: (1) sudo gedit/etc/apache2/sites-enabled/000-Default

(2) Find DocumentRoot in the document and modify the directory of the webpage file to be placed.

(3) restart the Apache server

5. Multiple developers use an apache2 server for development.

You can use the Linux ln command to create a soft connection for each developer under the root directory, pointing to your own Development Directory.

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.