How to configure Apache2 in UbuntuServer

Source: Internet
Author: User
During this time, I have been studying the configurations of Several Linux Server versions. Ubuntu has very good online resources and community support (the key is simple enough...), so we finally chose Ubuntu as the main research object. However, Ubuntu is better than Server in terms of desktop. After completing the initial Apache2 configuration, let's talk about the process. If something goes wrong, contact me. 1) Environment Introduction: I use VMware5.x Virtual Machine + Ubuntu6

During this time, I have been studying the configurations of Several Linux Server versions. Ubuntu has very good online resources and community support (the key is simple enough...), so we finally chose Ubuntu as the main research object.

However, Ubuntu is better than Server in terms of desktop.

After completing the initial Apache2 configuration, let's talk about the process. If something is wrong, contact me.

1) Environment Introduction

I am using a VMware5.x VM + Ubuntu6.06 Server (I suggest using a VM as a beginner)

Http://www.onlinedown.net/soft/2062.htm for VMware5.x

The registration code: JK8RT-TF62M-Z816C-4W8ZK

2) LAMP installation

Select LAMP mode to install Ubuntu (Linux, Apache2, MySQL, and PHP5 are both completed)

For detailed installation process, go to Ubuntu official help for reference.

3) Network Configuration

When installing Ubuntu, a dialog box for checking DHCP appears, which usually fails (fail), and then prompts you whether to perform manual configuration. By default, the virtual machine shares the physical network card with the physical machine in the bridged mode. If the physical machine is tested locally, no configuration is required. I access the Internet through a route in the Organization, and the gateway is 192.168.1.1. Therefore, Ubuntu is assigned a different IP segment (192.168.1.22) from other machines (including its own physical machines). The subnet mask is 255.255.255.0. After installing 192.168.1.1 for both the DNS address and gateway, you can directly update the IP address on the Internet.

The Virtual Machine and the Local Machine PING each other

It is best to distinguish the IP address of the VM from that of the Local Machine (not 127.0.0.1). Ubuntu can modify the configuration in the etc/network/interface. The first Nic is generally named eth0, below is the interface content on my Ubuntu:

Auto eth0iface eth0 inet static address 192.168.1.22 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1 dns-nameservers 192.168.1.1auto eth0, which means that the NIC configuration is automatically loaded when Linux is started.

The following are some configuration information in sequence:

If it is not a dial-up Internet access (DNS is fixed), you must add it to resolv. conf under etc.

Nameserver 192.168.1.1 (DNS server address)

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.