How to create a local VM using php in winxp apache

Source: Internet
Author: User

1 In C: \ WINDOWS \ system32 \ drivers \ etc \ hosts
Add the following code:
127.0.0.1 localhost
127.0.0.1 x.test.com x.test1.com x.test2.com
Note: x.test.com (assuming DNS)
2 In E: \ WAMP \ Apache2.2 \ conf \ extra \ httpd-vhosts.conf
Modification content:
NameVirtualHost *
<VirtualHost *>
ServerAdmin web@xxx.com
DocumentRoot E:/WAMP/www
ServerName localhost
ErrorLog logs/localhost-error_log
CustomLog logs/localhost-access_log common
</VirtualHost>
<VirtualHost *>
ServerAdmin web@xxx.com
DocumentRoot E:/WAMP/www/app (application directory)
ServerName test.com
ServerAlias x.test.com admin.teeume.com
ErrorLog logs/x.test.com-error_log
CustomLog logs/x.test.com-access_log common
</VirtualHost>
<VirtualHost *>
ServerAdmin web@xxx.com
DocumentRoot E:/WAMP/www/app/assets
ServerName x.test1.com
ErrorLog logs/img.test1.com-error_log
CustomLog logs/img.test1.com-access_log common
</VirtualHost>
# Self-built directory
<VirtualHost *>
ServerAdmin web@xxx.com
DocumentRoot E:/WAMP/www/test/assets
ServerName x.test2.com
ErrorLog logs/img.test2.com-error_log
CustomLog logs/img.test2.com-access_log common
</VirtualHost>
======================================
3. Check whether php is associated.
Find httpd. conf in E: \ WAMP \ Apache2.2 \ conf
Check whether the following code exists at the end:
########### Start for php5
LoadModule php5_module E:/WAMP/php5/php5apache2_2.dll
PHPIniDir E:/WAMP/php5
AddType application/x-httpd-php. php. phtml. php5
AddType application/x-httpd-php-source. phps
##### End for php5
If not, add it as code.
4. Search
# Virtual hosts
# Include conf/extra/httpd-vhosts.conf
Change
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
5. Search
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
Change
<IfModule dir_module>
DirectoryIndex index.html. var index. php
</IfModule>
6. Find <Directory "E:/WAMP/Apache2.2/htdocs">
Change to <Directory "E:/WAMP/www"> (www is the apache application Directory)
7. Find DocumentRoot "E:/WAMP/Apache2.2/htdocs"
Change to DocumentRoot "E:/WAMP/www"
8. Find ServerRoot "E:/XXX/Apache2.2" (apache installation directory)
Change to ServerRoot "E:/WAMP/Apache2.2" (apache Server Directory)
9 x.test.com x.test1.com x.test2.com
Enter the preceding three items for testing.

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.