Home Backend Development Python Tutorial Installation of XAMMP in MAC environment and what needs to be paid attention to

Installation of XAMMP in MAC environment and what needs to be paid attention to

Sep 17, 2018 am 10:50 AM
mac xampp

The content of this article is about how to install XAMMP under MAC and what needs to be paid attention to. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

Background knowledge:

  1. xampp is a multi-platform PHP integrated environment installation package, where a represents Apache, m represents Mysql, and p represents PHP and Perl. This article will introduce the installation of xampp under the mac platform and the download of XAMMP multi-platform.

1. Download the dmg installation package and double-click to install.

2. After installation, enter localhost to run, which means the installation is successful. The XAMPP folder can be found in the application. The internal file structure is as follows

Installation of XAMMP in MAC environment and what needs to be paid attention to

3. Next, configure the virtual host. First open httpd.conf in the etc directory and modify it as follows :

<Directory />
   #AllowOverride none
   #Require all denied
   #注视掉上面两句,添加如下两句
   Order deny,allow
   Allow from all
</Directory>
#htdocs相当于web的目录,要运行的web项目都是要放在htdocs中才能运行的
#这里我们修改这个目录到桌面的www目录
#DocumentRoot "/Application/XAMPP/htdocs"
DocumentRoot "/Users/weixin/Desktop/www"
#同理修改目录到桌面的www目录
#<Directory "/Application/XAMPP/htdocs">
<Directory "/Users/weixin/Desktop/www">
    Options Indexes FollowSymLinks ExecCGI Includes
    AllowOverride All
    Require all granted
    #增加下面两句话
    Order deny,allow
    Allow from all
</Directory>
#找到vhosts
# Virtual hosts
# Include etc/extra/httpd-vhosts.conf  去掉前面的#
#至此httpd配置文件修改完成
Copy after login

4. Regarding the usage of Order deny and allow, you can view this blog post: Click here to view

5. Next, open the httpd-vhosts.conf file in the extra directory under etc , modify as follows:

<VirtualHost *:80>
    #ServerAdmin webmaster@dummy-host.example.com
    #DocumentRoot用来设置当前这个虚拟主机指向的项目地址,
    #我在www目录下创建了一个test目录,用来做测试,因此当前这个虚拟主机指向这个test目录
    #DocumentRoot "/Application/XAMPP/htdocs"
    DocumentRoot "/Users/weixin/Desktop/www/test"
    #ServerName用来这是域名,这里可以随便取
    #ServerName dummy-host2.example.com
    ServerName test.cn
    #ServerAlias test.cn
    #一般后面的两句无须改动
    ErrorLog "logs/dummy-host.example.com-error.log"
    CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>

至此,我们设置了test.cn这个域名指向桌面www目录下的test目录
Copy after login

6. Hold down the command space, enter /private/etc/, press Enter to enter the etc directory, find the hosts file, drag it to the desktop, make the following modifications, and drag it back again etc directory:

127.0.0.1 test.cn  #注意test.cn这个值,需要和第五步中设置的域名对应
Copy after login

7. Create a new index.php file in the test directory and enter:

<?php 
phpinfo();
Copy after login

8. After restarting apache, when accessing test.cn, the following error will generally appear:

Installation of XAMMP in MAC environment and what needs to be paid attention to

9. According to the above configuration, it can generally run smoothly under the windows platform, but there is one more place that needs to be modified under max. Open the httpd file and modify it as follows:

#修改用户名,修改为当前使用者的用户名
#User daemon
User weixin
#修改组,这里只需要把它注释就好
#Group daemon
Copy after login

10. Restart apache and visit test.cn again:

Installation of XAMMP in MAC environment and what needs to be paid attention to

11. At this point, we have successfully configured XAMPP under mac. After that, we can write PHP code. Go to the www directory on your desktop

The above is the detailed content of Installation of XAMMP in MAC environment and what needs to be paid attention to. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

No response when entering password on mac keyboard? No response when entering password on mac keyboard? Feb 20, 2024 pm 01:33 PM

Introduction: In this article, this website will introduce to you the relevant content about the Mac keyboard not responding when entering passwords. I hope it will be helpful to you, let’s take a look. How to solve the problem that the password cannot be entered on the Apple Mac system? You can also try to connect this keyboard to other computers to see if it works normally. If the same problem occurs on another computer, it's most likely a fault with the keyboard itself. You may consider replacing the keyboard or repairing it. The first time you log in to Alipay with your Mac computer, you will find the login interface and cannot enter your password. The password input field displays: "Please click here to install the control", so Alipay login requires the installation of security controls. Security controls can encrypt and protect the information you enter (amount, password, etc.) to improve account security. Tie

3 tips to easily customize your Mac computer name, host name and Bonjour name 3 tips to easily customize your Mac computer name, host name and Bonjour name Mar 06, 2024 pm 12:20 PM

Many Mac users tend to keep the default name of their device and may never consider changing it. Many people choose to stick with the name from the initial setup, such as "Johnny's MacBook Air" or simply "iMac." Learning how to change the name of your Mac is a very useful skill, especially when you have multiple devices, as it can help you quickly distinguish and manage them. Next, we will teach you step by step how to change the computer name, host name and Bonjour name (local host name) in macOS system. Why should you change your Mac name? Changing the name of your Mac can not only show your personality, but also help improve the user experience: Personalize your Mac: The default name may not be to your taste, change it to a name you like.

Forgot your mac installer password? Forgot your mac installer password? Feb 20, 2024 pm 01:00 PM

Introduction: In this article, this website will introduce to you the relevant content about forgetting the password of the Mac installation program. I hope it will be helpful to you, let’s take a look. What to do if you forget your password for Apple computer installation software. First, find iCloud in the phone settings and click to open it. Next, enter your account number and password. There is a line of small words below the login button that prompts you if you have forgotten your ID or password. Click this option. Normally, after you enter an incorrect password multiple times on the login interface, your MacBook Pro will prompt you to use your bound Apple ID to reset your password. You only need to follow the steps prompted by the system to complete the password reset. 3. First shut down your Mac, then restart it. While pressing the power button, immediately press and hold com on the keyboard.

pkg file to install on mac? pkg file to install on mac? Feb 20, 2024 pm 03:21 PM

Preface: Today, this site will share with you the relevant content about installing pkg files on Mac. If it can solve the problem you are facing now, don’t forget to follow this site and start now! The previous version of macos pkg cannot be installed to upgrade the operating system: If your laptop is using an older operating system version, it is recommended to upgrade to the latest operating system version. Because older versions may not support installation of the latest macOS system. Select "Erase" in Disk Utility, then select the Macos extension in the format, do not check the encryption option, and do not select the apfs format, and finally click the "Erase" button to solve the problem of being unable to complete the macOS installation. Drag the application's icon to the file starting with App

How to set up WeChat Mac to automatically convert voice messages into text - How to set up voice to text conversion How to set up WeChat Mac to automatically convert voice messages into text - How to set up voice to text conversion Mar 19, 2024 am 08:28 AM

Recently, some friends have consulted the editor about how to set up WeChat Mac to automatically convert voice messages into text. The following is a method for setting up WeChat Mac to automatically convert voice messages into text. Friends in need can come and learn more. Step 1: First, open the Mac version of WeChat. As shown in the picture: Step 2: Next, click &quot;Settings&quot;. As shown in the picture: Step 3: Then, click &quot;General&quot;. As shown in the picture: Step 4: Then check the option &quot;Automatically convert voice messages in chat to text&quot;. As shown in the picture: Step 5: Finally, close the window. As shown in the picture:

Can Mac cut files to hard drive? Can Mac cut files to hard drive? Feb 20, 2024 pm 01:00 PM

Introduction: This article is here to introduce you to the relevant content of cutting files to the hard disk on Mac. I hope it will be helpful to you, let’s take a look. How to Export Photos to a Mobile Hard Drive on a Mac Computer You can use the Finder or Photos application to export photos to a mobile hard drive. When using Finder to export photos, first make sure the mobile hard drive is connected to the Mac and is successfully recognized by the Mac. The steps to transfer photos from Mac to hard drive are simple: first, connect the mobile hard drive to the computer, and then open the [Launcher] icon. Then, find and click the [Photos] icon in the pop-up window. In the opened [Photos] window, hold down the [Shift] key

How to turn pages when typing on Apple Mac? How to turn pages when typing on Apple Mac? Feb 20, 2024 pm 12:54 PM

Introduction: Today, this site will share with you relevant content about how to turn pages when typing on Apple Mac. If it can solve the problem you are facing now, don’t forget to follow this site and start now! Tips for using the touchpad on Apple MacBook laptops. The steps for setting up two-finger sliding on Apple computers are as follows: Find the "Settings" icon on the computer desktop and click it. Select "Touchpad" in the settings interface, and then click "Scroll to Zoom". Check "Scroll direction: Natural" in the scroll zoom options to complete the setting. Setting up a two-finger swipe method on your Apple computer is easy. First, turn on your computer and click on the Settings icon at the top of the screen. In the settings interface, select the "Touchpad" option. Then click "Scroll Zoom" and make sure "Scroll Direction" is checked

3 Ways to Convert HEIC Photos to JPG on Mac 3 Ways to Convert HEIC Photos to JPG on Mac Mar 15, 2024 pm 08:43 PM

By default, iPhone takes photos from the camera in HEIC format. HEIC stands for High Efficiency Image Container and can hold more pixel data than PNG or JPG files, taking up significantly less space on iPhone storage compared to other formats. These files work best on iPhones but are not widely accepted on the internet because they often result in blurry/grainy pictures when you share them with non-Apple devices. To ensure that HEIC images are compatible on other devices, you may need to convert them to JPG format. This article will introduce how to convert HEIC images to JPG on Mac. How to Convert HEIC Photos to JPG on Mac [3 Methods] Method

See all articles