Local access to web services (Environment lamp) in VMWare virtual machines)

Source: Internet
Author: User

Centos installed on my virtual machine:

1. Select the network mode of the VM as host-only.

2. Open the VM and run the ifconfig command to view the IP address of the NIC. (The IP address refers to inct addr: 192.168.128.128 in eth0)

3. Modify the listen in the Apache configuration file.

Directory/etc/httpd/CONF/HTTP. conf

Save after modification

4. Restart the HTTPd service.

# Service httpd restart

5. Press CTRL + ALT to exit the VM and enter 192.168.128.128 in the browser to access your web page.

PS: if access fails or a 403 error occurs, shut down the firewall in the VM.

Command to disable the firewall: Service iptables stop

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.