: This article mainly introduces how to configure xmappvirtualhost for helloworldtophpmac. if you are interested in the PHP Tutorial, refer to it. 1. install xmapp. Check whether the service can be started (databases and servers) after installation)
2. configure your virtualhost
1. add the server domain name to the system host file (enter the domain name in the browser and then use the host file first)
Sudo nano/private/etc/hosts (you can also use vim to open and edit it)
2. configure Apache and open the configuration file/Applications/XAMPP/etc/httpd. conf of Apache.
# Virtual hosts Include
/Applications/XAMPP/etc/extra/httpd-vhosts.conf # let Apache read the configuration file of the VM
3. add the Virtual Host configuration in the configuration httpd-vhosts.conf
SetOutputFilter DEFLATE
Options FollowSymLinks
AllowOverride All
Require all granted
# Order allow, deny
Allow from all
DirectoryIndex index.html index. php
ErrorLog "/Users/only/Desktop/www/logs/dummy-host.example.com-error_log"
CustomLog "/Users/only/Desktop/www/logs/dummy-host.example.com-access_log" common
IV. problems
1. mysql cannot be started (re-install xmapp)
2. the website always jumps to the renewal page of the xmapp. It is possible that the system has not jumped to the system file when Apatch is modified.
3. if Error 403 is displayed, search for User Deamon in httpd. conf, change deamon to the OS User name, and restart Apache (server folder
1)
5. use vim commands
Open sudo vim fileName;
Input I
Exit Press esc press: enter command mode wq save exit
If you are an independent student and have no friends, you will be ignorant! Share knowledge, exchange technology, and ideas.
The above describes how to configure xmapp virtual host for a hello world to php mac, including some content, and hope to help those who are interested in PHP tutorials.