How to test the Macintosh Web server

Source: Internet
Author: User
Tags html page http request

  Testing the Macintosh Web server (PHP developer)

You can use the Apache Web server that is already installed on the Macintosh to develop PHP applications.

To test the server, create a simple HTML page called "mytestfile.html" and save it in the/users/your_user_name/sites/folder on the Macintosh (where Your_user_name is your Macintosh user name). The HTML page can consist of one row, for example:

<p>my Web server is working.</p>

Then, enter the following URL in your Web browser to open the test page in your Web browser with an HTTP request:

Http://localhost/~your_user_name/myTestFile.html

Note By default, the Apache server is running on port 80.

If your browser displays your page, the WEB server is running fine. If the browser cannot display the page, open System Preferences to view the sharing preferences panel to see if the WEB server is started. The personal Web sharing option should be enabled.

By default, the Apache Web server cannot process PHP, and you must configure it to use PHP.



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.