Home  >  Article  >  Backend Development  >  Introduction to how to access apache server in win2003 virtual machine

Introduction to how to access apache server in win2003 virtual machine

巴扎黑
巴扎黑Original
2017-08-15 13:23:451430browse

The following editor will bring you an article based on access to the apache server in the win2003 virtual machine. The editor thinks it’s pretty good, so I’ll share it with you now and give it as a reference. Let’s follow the editor and take a look.

Although configuring PHP in win2003 is a bit unconventional, you still need to know how to do it. You can also think of the virtual machine in this article as the server and the host as the client.

Unlike the Linux system, due to the existence of IIS in win2003, it occupies the inherent port 80. The apache server configured in the win2003 virtual machine is often forced to change to other ports, such as 8081. Sometimes, if If you want to access php configured under apache under win2003 on the host or external network, you may be able to ping it, but cannot access it.

First, in the virtual machine, learn the IP address of the virtual machine win2003 through ipconfig.

Then on the host machine, I found that pinging this address can ping successfully:

However, on the host machine, When accessing 192.168.230.128:8081, which is 127.0.0.1:8081 on the virtual machine, the web page cannot be found.

Insert a sentence here, if you cannot use the above ipconfig and ping commands, please add c:\windows\system32 to the path of the environment variables on your host and virtual machine.

At this time, you mainly want to check the evil firewall in the virtual machine. Under normal circumstances, just turn it off and save trouble:

If you don’t want to be so bold , you can add a 8081 port in the exception, enter the name as you like, for example apache, the port number is 8081, use TCP protocol, click "OK".

Then, after the firewall is finished, we still need to get the Apache configuration file conf/httpd.conf to monitor this IP and port, that is, let Apache allow access to this IP and port. , add one at about line 60. At that time, I forgot to do this, and it took me a long time:

Restart the server, so that Apache in the virtual machine can simply For local stand-alone access, it can also be accessed on the host machine.

The above is the detailed content of Introduction to how to access apache server in win2003 virtual machine. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn