- #Configure mysql on mac install#
- #Configure mysql on mac update#
- #Configure mysql on mac password#
- #Configure mysql on mac download#
Include /private/etc/apache2/extra/nfįind the following lines and comment them by adding # at the beginning of the line. Uncomment the following line for User home directories. LoadModule rewrite_module libexec/apache2/mod_rewrite.so LoadModule include_module libexec/apache2/mod_include.so LoadModule userdir_module libexec/apache2/mod_userdir.so LoadModule authz_host_module libexec/apache2/mod_authz_host.so LoadModule authz_core_module libexec/apache2/mod_authz_core.so To uncomment the following lines remove the # from the start of the line. Now open the nf file using vi and uncomment the following lines. Inside this directory we have the nf file.Īs a good practice we will make a backup copy of the nf file by typing the following command in the terminal. Type the following command in the terminal and go to apache2 directory. Where, username is your username that you have set earlier. If not, then use the following command to change its permission. The permission of this file should be the following. And to save the file and exit type the following :wq and hit Enter. Now, to come out of the INSERT mode press the Esc key. Here is what I have written in my nf file. Options Indexes MultiViews FollowSymLinksĭon't forget to replace YOUR_USER_NAME with your username. Press the i key to enter into INSERT mode. You can use other editors like vim or nano. In the following example I am using vi editor. Now create the configuration file nf inside the users directory. Open terminal and go to the following directory. Type the whoami command in the terminal and it will tell you your username. Note! Replace the username with your username.įor example, my username is yusufshakeel so, my file is nf. Now, its time to create a nf file which will help in configuring our document root. Now, run the following command to create the Sites directory.įor me the user document root path is the following. Run the following command to switch to the user home directory. The system level document root in macOS Mojave is located in the following directory.įor the user level we can create a directory called Sites in user directory. One is at the system level and the other is at the user level. This is the location in the computer file system from where the files are accessed when we visit the localhost in a browser.ĭocument Root is a directory where we put our website files. In case you don't get to see the above output then run the following command to check the error. If you want to stop the Apache server then run the following command.Īnd to restart Apache server run the following command.Īfter starting Apache server go ahead and test it by opening a browser like Safari or Chrome and visit You will get to see the following output in your browser.
#Configure mysql on mac password#
When you use sudo in the terminal then you will be prompted to enter your admin password to proceed. To start Apache web server run the following command. To check the version of Apache installed run the following command in the Terminal. Open Terminal using macOS Spotlight or go to /Applications/Utilities and open Terminal. The new macOS Mojave comes with Apache pre-installed. Lets go ahead and configure our LAMP stack development environment on macOS Mojave.
#Configure mysql on mac download#
We will be using the pre-installed Apache and PHP and we will download and setup MySQL database.
#Configure mysql on mac install#
Edit host file for your sever name, open /etc/hosts and add this line to itġ0.In this tutorial we will learn to install Apache, MySQL, PHP on macOS Mojave 10.14.Īpple released the new macOS Mojave 10.14 on 24th September 2018 and it includes Apache and PHP. SSLCertificateKeyFile /etc/apache2/ssl/server.keyĨ.
Replace the value for ServerName, DocumentRoot and Directory path to yours. Configure vhosts to enable https 443, open /etc/apache2/extra/nf and the below to it. SSLCertificateKeyFile "/etc/apache2/ssl/server.key"ħ. SSLCertificateFile "/etc/apache2/ssl/server.crt"
#Configure mysql on mac update#
Open /etc/apache2/extra/nf search for lines with SSLCertificateFile and SSLCertificateKeyFile, update them to the below LoadModule ssl_module libexec/apache2/mod_ssl.so If there is but with # sign at the beginning, remove the # sign. Open /etc/apache2/nf, make sure you have these 3 lines in it. Sudo openssl x509 -req -days 99999 -in request.csr -signkey server.key -out server.crtĥ. Create SSL certificate file from the request file. Sudo openssl req -new -key server.key -out request.csrĤ. Enter info or leave blank when asked various questions. Create server key, just press enter when asked for password.ģ.