I have just left my job recently, I have been developing my resume, and I still have some final jobs in my hand. I haven't been writing any more blogs for a long time. Today, my friend asked me to create a website for an unlimited sub-station and a multi-user store that is pan-parsed, therefore, domain names must be used for local testing. the previous successful debugging of the apache and hosts local domain names failed! Tangle...
First, copy the hosts under C: \ Windows \ System32 \ drivers \ etc to the desktop, open it in notepad, and add your own records.
# localhost name resolution is handled within DNS itself.# 127.0.0.1 localhost# ::1 localhost127.0.0.1 www.dede.com
It is configured in apache:
1. Remove the # Before the Include conf/extra/httpd-vhosts.conf.
2. Remove the # In Front Of LoadModule vhost_alias_module modules/mod_vhost_alias.so.
3. Save and exit
4. Open the httpd-vhosts.conf under conf/extra under the apache installation directory
5. Add the site information of the VM to it:
<VirtualHost *:80> ServerAdmin jsw7001@hotmail.com DocumentRoot H:/www/demo ServerName www.dede.com ErrorLog H:/www/demo/error.log</VirtualHost>
Restart the apache server and access the server. If the permission is denied, change the permission in the apache configuration file. Of course, you can also grant the directory permission.
If you still cannot access it, okay. Let's continue reading it. I just spent the whole morning.
Right-click my computer, choose manage> service, find the DNS clent service, and choose stop, change to manual. It takes more than a dozen seconds to access the service .. What? Not yet?
Okay. Let's continue.
Remove the check box for the proxy server in internet option-connection-LAN Settings in ie. No problem !! If you have any problem, add my QQ2387183033@qq.com, I will solve it for you !!
What? You must use a proxy. Well, the proxy and hosts must coexist. Simple
In ie, check the internet option-connection-proxy server in LAN Settings, and click Advanced. In the following case, enter the domain name that does not use the proxy .. That is, the domain name you wrote in hosts, and then. Save, application ..
Start debugging now! If you have any questions, you can add group 252799167 for improvement, or directly add my QQ2387183033.
This article is from the "Thunder" blog, please be sure to keep this source http://a3147972.blog.51cto.com/2366547/1252029