Install and set Apache2 in Ubuntu

Source: Internet
Author: User
Install apache installation command in Ubuntu: After the sudoapt-getinstallapache2 installation is complete: The generated Start and Stop file is:/etc/init. d/apache2 boot: sudoapache2ctl-kstart stop: sudoapache2ctl-kstop restart: The sudoapache2ctl-krestart configuration file is saved in:/etc/apache2 needs to be said

Install apache in Ubuntu

Installation command: sudo apt-get install apache2

After installation:
The generated startup and stop files are:/etc/init. d/apache2
Start: sudo apache2ctl-k start
Stop: sudo apache2ctl-k stop
Restart: sudo apache2ctl-k restart

The configuration file is saved in:/etc/apache2.
Note that the common apache release configuration file is:
Httpd. conf

The main configuration file of the ubuntu release version is:
Apache2.conf

The following file is referenced in apache2.conf:

# Configurations that contain dynamic modules:
Include/etc/apache2/mod-enabled/*. load
Include/etc/apache2/mod-enabled/*. conf
# Include your own configurations:
Include/etc/apache2/httpd. conf
# Configurations that contain port listening:
Include/etc/apache2/ports. conf
# Contains a general configuration statement segment:
Include/etc/apache2/conf. d/
# Configuration commands containing virtual hosts:
Include/etc/apache2/sites-enabled/

Modify httpd. conf
Add the following content:
ServerName 127.0.0.1: 80

For further configuration and use, you can refer to the APACHE manual.

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.