![]() ![]() Sudo -s /Applications/TextEdit.app/Contents/MacOS/TextEdit /private/etc/hostsĪt the end of the file, make an entry for each virtual host name. Then type this command to edit the hosts file. Include /Applications/XAMPP/etc/extra/nfĮdit the hosts file to include an entry for each new virtual host Remove the comment marker from the Include line, like this # Include /Applications/XAMPP/etc/extra/nf Sudo -s /Applications/TextEdit.app/Contents/MacOS/TextEdit /Applications/XAMPP/etc/nf Then type this command to edit the nf configuration file. You’ll just need to enter each ServerName into the hosts file (see below). You can have several virtual hosts by defining their DocumentRoot and ServerName. The Apache Software Foundation website has the definitive guide to configuring apache virtual hosts. # /Applications/XAMPP/xamppfiles/htdocs/ĭocumentRoot “/Applications/XAMPP/xamppfiles/htdocs/” # this adds a virtual host called sub.local which will have files located in ServerAdmin “/Applications/XAMPP/xamppfiles/docs/”ĮrrorLog “logs/-error_log”ĬustomLog “logs/-access_log” commonĭocumentRoot "/Applications/XAMPP/xamppfiles/htdocs" ServerAlias ErrorLog "logs/-error_log"ĬustomLog "logs/-access_log" common ServerAdmin "/Applications/XAMPP/xamppfiles/docs/" Sudo -s /Applications/TextEdit.app/Contents/MacOS/TextEdit /Applications/XAMPP/etc/extra/nf Then type this command to edit the nf virtual hosts file. My examples will use the Mac built-in editor, TextEdit for simplicity. If you know vi or nano or have TextMate installed, you could use those. * add an entry in your hosts file for each virtual host By: Procsilas Moscas ![]() * include the virtual hosts file in the nf ![]() * create a virtual hosts entry for each virtual host To create some XAMPP virtual hosts on our Mac, we need to But how do you do this with XAMPP? XAMPP uses Apache web server and to do this with Apache, you would create virtual hosts. You need to have the website act like it’s on it’s own first party domain. Sometimes, putting a website into a subdirectory just doesn’t cut it. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |