can't start apache using xampp on mac - macos

I know it has been asked a lot, but i can't find the solution.
I am a mac user, and trying to start the apache server on the xampp, but it suddenly stops.
when i try "sudo apachectl stop" I get this error message:
"/System/Library/LaunchDaemons/org.apache.httpd.plist: Could not find specified service".
when i look at the log of xampp:
when starting apache server:
"Starting Apache Web Server..."
but when it stops:
"/Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd started"
yet, i can see that it stoped.
does anyone know how to solve it?
thank you!

Related

another web server is already running and unable to run Apache2

I am using Kali linux
I am unable to run Apache2, i tried so many ways to fix it .., i successful installed xampp and apache2 but dont know why apache not running, mysql and proFTD is running
When i run code to to check the status of apache in lampp it show that another web server is already running.
(another web server already runing)
write this code in terminal
/opt/lampp/xampp disablessl
then check for the apache
sudo /opt/lampp/xampp start
Starting XAMPP for Linux 7.2.5-0...
XAMPP: Starting Apache...ok.
XAMPP: Starting MySQL...already running.
XAMPP: Starting ProFTPD...already running.

OS High Sierra - can't figure out what is listening on port 80

When i do a simple http://localhost i get the standard apache "It Works!"
However when I do a search for running services httpd is nowhere to be found.
When I try to manually shut of httpd through the console? The respoonse is "the httpd service is not running"
This is more annoying than anything because I have to run MAMP on a different port as well as my ZF app.
I've done extensive research online trying to figure out why httpd appears to be running transparently but can't seem to find a consistent answer. Apparently I'm not the only one to have a mysterious service on High Sierra hogging up port 80.
Any thoughts are appreciated.
MacOS is delivered with a functional Apache server. It is managed by launchd.
sudo launchctl list | grep http
should show org.apache.httpd service. If you are able to see "It works!" that means that a server is running. It is very strange that you can't see any "httpd" process.
ps -eax | grep httpd
must show you at least one httpd process. Even Activity Monitor.app will.
You will find log files of the server into /var/log/apache2 and the pid file path is /var/run/httpd.pid. All this may helps you to find what happens...
I just figured it out. For anyone interested it is "launchd" and can be resolved by doing
"sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist"

xampp Apache not running

few weeks before my xamppp was working properly.
but today when i started it ....it failed to open its phpmyadmin page..
so i installed it again.
now its apache is not running.
another webserver is running??? whats that??
enter image description here
the above image shows the error.
although apache was not running ...i tried start localhost.
and this cameup.
enter image description here
got my error.
port 80 was occupied by apache2.
removed apache2 from port 80 and it started woorking again.

Unable to start XAMPP Apache server on MacOS-Sierra

Whenever I'm trying to start my Apache server from XAMPP on my Macbook (MacOS-Sierra) . I'm getting following application log :
Starting Apache Web Server...
/Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd started
And status remains Stopped. I re-install XAMPP and restarted my laptop multiple times, but I'm still having same issue. Couldn't find anything help to resolve this issue.
I found the solution:
Make sure port 80 is not being used (Use Network Utility and scan for port 80. If you found any application using port 80, then kill it)
Open terminal and execute
sudo apachectl stop
(ignore, if you get any error)
On the same terminal window execute
sudo /Applications/XAMPP/xamppfiles/bin/apachectl start
Open XAMPP control panel, your apache server might have started by now, if not then you can start manually by clicking start button.
This worked for me!!
Simply goto your terminal and type:
sudo apachectl stop
It'll ask for password. Enter your system password.
Go back to XAMPP control panel and start Apache.
It should get started now.
I had the same Problem and fixed it by deleting the lib folder in Applications/XAMPP/xamppfiles/ and installing XAMPP again. It's probably due to old lib files from previous versions not being updated properly.
Another related issue, which I faced caused Apache sever failure. And failure logs is :
[Sun Jul 30 12:43:58.747822 2017] [unique_id:alert] [pid 9188] (EAI 8)nodename nor servname provided, or not known: AH01564:
unable to find IPv4 address of "MacBook-Pro.local" AH00016: Configuration Failed
To solve this :
Executed following command
sudo -e /etc/hosts
Then, changed following entries
127.0.0.1 localhost
::1 localhost
to
127.0.0.1 localhost MacBook-Pro.local
::1 localhost MacBook-Pro.local
I had the same issue when I update my XAMPP app, if you have to do this, you first have to uninstall your XAMPP (save your HTDOCS files in another folder, NOT in XAMPP folder, or you will lose it), and after that you can install the newest version of XAMPP. It worked for me, hope for you too.

Apache problem on Mac

I couldn't visit 127.0.0.1 on my mac . I turned on the "web share" already.
and there is no "httpd" process in Activity Monitor
When you say "visit" I assume you mean using your browser.
Your browser tries to connect to a HTTP server. If you don't have httpd or some similar program running on your box then it's no wonder you can't reach it.
Solution: Install and configure a Web server.
Alternate solution: Clarify what you're trying to do, and why.
I would use Terminal (/Applications/Utilities), and then try to start apache from the command line.
Try this to help debug:
sudo bash -x /usr/sbin/apachectl -k start
when it is dying silently. Also, check the error_log at: /var/log/apache2/error_log
You can use TextEdit for the error_log, if you feel more comfortable with a GUI text editor.
Let me know how it goes!

Resources