Apache Server Configuration

Source: Internet
Author: User

Commonly used vim keys:
Select when forward
Y copy
P Sticky Sticker
X Delete
I edit
ESC Exit Edit
: Wq Save Exit
: q! Do not save exit
/ Find string

The command line to use
sudo executes commands with Administrator privileges
LS Displays the file name in the current directory
PWD Displays the current directory path
Clear Clear Screen
CD Entry Directory
sudo rm deletes files with Administrator privileges
CP Copy File
sudo apachectl-k start Apache

On your Mac, the Apache server is installed by default.

1. Check whether the Apache server is started

Enter localhost or 127.0.0.1 in the Safari browser (Firefox is not recommended)

2. Open Apache

Open terminal, input sudo apachectl-k start, enter

Enter password, password for Mac user login password, enter

3. Check Apache Open, open

4. Modify Apache path for later operation

Go to Apache Path: cd/etc/apache2

View current path: pwd

To view files in the current directory: LS

Backup Apache configuration file httpd.conf:sudo cp httpd.conf Httpd.conf.bak

Go to httpd.conf file: sudo vim httpd.conf

To modify a path:

1). Find/documentroot

2). Press I to edit, modify the path to/users/eazy/sites

Path directory: Go-"enter" ~ "Symbol-" New folder sites

Put demo.html and info.php files in sites (Baidu Cloud: Http://pan.baidu.com/s/1i38NCrV Password: H5QB)

3). Press ESC to exit edit

4). Add Indexes

5). Open PHP, remove the comment symbol #

6). Save exit:: Wq

5. Copy the Php.ini.default file to PHP.ini

1) CD.

2) sudo cp php.ini.default php.ini

6. Restart Apache service: sudo apachectl-k restart

7. Check if the configuration is successful

Apache Server Configuration

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.