Because many programmers will be in the development of the Apache designated Site Directory to build a folder to put the site, when the local test is input http://127.0.0.1/web1/such access to the site, but the site is uploaded to the domain name, which will cause incorrect path.
Workaround:
Locate the Hosts file in the C:\WINDOWS\system32\drivers\etc directory, open it with text and add a sentence
127.0.0.1 emtit.com
This way you can use www.emtit.com to access your site without a DNS server, but you can't get to your virtual directory, open Apache's httpd.conf configuration file, and add the following code
Copy Code code as follows:
Namevirtualhost *:80
<virtualhost *:80>
ServerAdmin hjwtp2005@163.com
Documentroot/flashgame
ServerName emtit.com
Serveralias www.emtit.com
ErrorLog @rel_logfiledir @/dummy-host.example.com-error_log
Customlog @rel_logfiledir @/dummy-host.example.com-access_log Common
</VirtualHost>
This way you can access the local Web site as you would access the extranet without having to set up DNS.