Apache Server built under Ubuntu

Source: Internet
Author: User

This document complies with Cc-by.

Objective:

In fact, under Ubuntu to build Apache server exception simple, below the beginning of the text.

First, download the installation

There are actually two ways to do this,

1. Download the source code to the local compilation from the official website;

2. Using the apt-get of UBUNTN;

In fact, I have used both methods, and passed, but you do not have any high-level customization requirements, it is very recommended to use the second method.

1. Compile the source code on the official website has detailed steps, as long as follow him to go on the official website (this inside of the compiling and installing part)

2. Download and install

sudo Install apache2

View service startup status after installation is complete

sudo service apache2 status

3. Configuration

This section should focus on two places (for installation using the Apt-get command)

1./etc/apache2/apache2.conf: Contains the Apache server configuration, which has detailed instructions, according to the requirements of the free control (I did not make changes).

2./var/www: This directory is used to open your local directory, the initial state is only one index.html, you can use the soft link will be open directory, such as

sudo Ln -s/home/username/apache.

4. View

If you do not modify the Apache default port for the third part, simply enter it in the browser:

#你的本地ip: 192.168/ Open Directory name . 11.11:/apache

If no directory name is entered, the Index.html interface is automatically entered.

Second, cooperate with other use

In fact, I agree that my use of the way a bit of clay turtle, there should be a better way, but the project is too urgent, later in the study of what is not cumbersome usage.

Scenario 1. Developing the Java Web, with multiple projects sharing a project directory problem:

It sounds pretty round, doesn't it? For example, now that the project is divided into three roles (admin, user, developer), three sub-projects have been created due to the basic independence of three roles, but the developer is uploading the app, and the app will be saved to the Wtpapps Developer's directory, and if you want to see the other two roles, there will be an access issue. , the developer directory can be shared with the Apache server, and other roles access the Apache server through HTTP.

Description: The above usage is a bit problematic, because the premise of using the above method is that the developer's project is to have to run up, otherwise in the Wtpapps directory is not related to the directory, there will still be problems, see Scenario 2 below.

Scenario 2. Based on scenario one, but requires the ability to independently run each project without affecting each other:

I added an FTP server here, about the FTP server Setup and upload operations please check out two blog posts Ubuntu build FTP server, ftpclient use brief

The overall idea is this:

1. The developer will upload the app via FTP to the FTP server;

2. FTP server will upload the directory through Apache open for other projects to share;

3. Get it done.

Apache Server built under Ubuntu

Related Article

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.