If you have a non running web server fron a previous life. This means any of
It must be updated ie uninstalled, and reinstalled. Period!
Uninstalling is simple, just remove its directory, folder, on your hard disk. Important: If you have documents in an htdocs, or www directory belonging to any of MAMPP, WAMPP, or XAMPP you may want to save it to another place on your hard drive before you erase MAMPP, WAMPP, or XAMPP. You can move it back to the appropriate location after the following install.
XAMPP and the others comprise the Apache Web Server, the MariDB RDBMS, and the PHP programming language. Install it by:
First unload Mac's built in apache
sudo apachectl stop
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
Then do
brew install --cask xampp
If you moved and previous htdocs
,
or www
directory, move it back
and you are ready to roll.
Start cmd
as
administrator and do
choco install xampp-80
If you moved and previous htdocs
,
or www
directory, move it back
and you are ready to roll.
No web developer lives without a running web server. Noone! If you don't want any of the above packages, but instead go for Apache, MariaDB, and PHP separately, start with Apache here:
First unload Mac's built in apache
sudo apachectl stop
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
Then do
brew install httpd
And then
sudo brew services start httpd
The web server is now available as a service.
Reach it from your browser at
http://localhost:8080
.
It's root directory is:
/usr/local/var/www
All your future web work should be placed in
that branch of your file system, or you must
reconfigure Apache to point into your own
area of the hard disk.
Now we will benefit from installing
Chocolatey.
Start cmd
as
administrator and do
choco install apache-httpd
You will be asked for a "Y" a couple of times, give it, then restart when prompted. Once you have it installed, maintenance is simple. Start the CLI and do
choco upgrade apache-httpd
The web server is now available as a service.
Reach it from your browser at
http://localhost:8080
.
It's root directory is:
C:\Brugere\<youruserid>\Roaming\Apache24\htdocs
All your future web work should be placed in
that branch of your file system.