Build a Web server on a Raspberry Pi--based on Apache

Source: Internet
Author: User
Tags shell account

1,apache Introduction:

Apache is the world's first-ranking Web Server software . It can run on almost all of the widely used computers

platform Because of its cross-platform and security is widely used, is the most popular Web server-side software.

For more information, see:

" Baidu Encyclopedia- Apache"

" Wikipedia -apache HTTP Server "

2, install Apache to Raspberry Pi:

Apt-get Install Apache2

Want to continue[y/n]? When entering Y, enter, wait for the installation to complete.

3, LAN access test:
Enter the IP address of the Raspberry Pi in the browser address bar and you will see the interface as shown in the carriage return:


This is the home page of the default Apache WEB server. We can modify this page file, this page file is /var/www/index.html, I use the web Editing tool to modify this file, the modified file content as follows:
<p> Ahan is a tease! </p><p> King Kong is a tease! </p><p>  </p>

After you save this file, then go to the access page as shown:


4, Port mapping:Now we build the site can only be accessed within the LAN, we can set up the router to the Raspberry Pi exposed to the outside network, so that the extranet can also access our website, at the same time, we can also apply for a peanut shell account, for us to do dynamic Domain name resolution (free), So that we can access the site on the Raspberry Pi through the domain name. Peanut shell account registration process is not listed, we have to solve Baidu's own. Here is the router setup process:
① Login to your router Management page:

② Login to your peanut Shell account:

③ to expose the Raspberry Pi IP to the outside network:

Click " Add new entry ", fill in the IP address of the Raspberry Pi, and then fill in a port number (the default Web server port number is 80, but the 80 port is often blocked by the operator, so I wrote a random 8899)
When you are finished, click " save ".
5, external network access test: Enter your peanut shell free domain namein the address bar of the browser: 8899, enter, see the page with the same as previously seen in the LAN:

statement: I am a non-computer-related professional background, the above blog will inevitably have a lot of omissions, I hope the great God do not spray! Please give me a lot of advice!


Build a Web server on a Raspberry Pi--based on Apache

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.