First let's install Homebrew.
Homebrew Installation
Homebrew can self-diagnose. Let's see if everything works the way it should.
Add the Homebrew taps we need.
Apache Installation
macOS comes with Apache pre-installed, stop it and prevent it from starting on boot.
Ios screensaver for os x. Just right-click on your.saver file and choose Open from the right click menu.You’ll see a similar Gatekeeper warning again, but this time you’ll also see an “Open” button at the bottom of the window.
Dec 24, 2017 How-to Install HomeBrew for Mac OS X High Sierra 10.13: HomeBrew Installation. Command to Install Brew on Mac OS X. Open a Command Line Terminal Window Finder Applications Utilities Terminal (Press “Enter” to Execute Commands) Installing Wget Utility. Sudo brew install wget.
We don't want to use the pre-installed Apache. Instead we'll brew and configure it to run on standard ports (80/443).
Check installation.
Start Apache, open browser with http://127.0.0.1 and you should see a message saying “It works!”
Set Apache to launch on startup.
You can watch the Apache error log in a new Terminal tab/window during a restart to see if anything is invalid or causing a problem:
Remember useful commands.
PHP Installation
The php.ini file can be found in: /usr/local/etc/php/7.2/php.ini.
Apache PHP Setup
You have successfully installed your PHP versions, but we need to tell Apache to use them.You will again need to edit the /usr/local/etc/httpd/httpd.conf. Modify the paths as follows,comment out all but one entry:
Edit /usr/local/etc/httpd/httpd.conf and uncomment these lines..
Modify httpd.conf more..
Check DirectoryIndex includes index.php.
Find Listen 8080 and change it:
Servername is disabled by default, set it to localhost:
Restart apache
PHP Switcher Script
We hard-coded Apache to use PHP 5.6, but we really want to be able to switch between versions. Luckily, some industrious individuals have already done the hard work for us and written a very handy little PHP switcher script.
We will install the sphp script into brew's standard /usr/local/bin:
Testing the PHP Switching
After you have completed these steps, you should be able to switch your PHP version by using the command sphp followed by a two digit value for the PHP version:
MariaDB Installation
Install MariaDB with Homebrew.
After installation, start the MariaDB server with..
After MariaDB is started, you can connect.
SSL/Virtual Hosts![]()
Change default 8443 ports to 443 in the SSL configuration file. Mac os x 10.11 download free.
Replace 'Listen 8443' with 'Listen 443'.
Also update it here:
General setup for the virtual host
Save the file, open up /usr/local/etc/httpd/extra/httpd-vhosts.conf and add your own SSL based virtual hosts.
Create your virtual host entries that you want to use SSL with.
CertificatesMac Os Mojave
Generate a key and certificate.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |