sudo apachectl -k start not work on MacOS HIGH SIERRA - macos

I've run sudo apachectl -k start , but the httpd process wasn't created.
And when I've run apachectl configtest on terminal, it shows me Syntax OK.
Also I run other commands:
sudo apachectl -k restart => httpd not running, trying to start.
sudo apachectl -k stop => httpd (pid 1369?) not running
More info about apache error_log file: LogLevel debug
[Mon Nov 27 01:15:00.390588 2017] [unique_id:info] [pid 1572] AH01566: using ip addr 192.***.*.**
[Mon Nov 27 01:15:01.004998 2017] [ssl:info] [pid 1572] AH01887: Init: Initializing (virtual) servers for SSL
[Mon Nov 27 01:15:01.008629 2017] [ssl:info] [pid 1572] AH01876: mod_ssl/2.4.25 compiled against Server: Apache/2.4.25, Library: OpenSSL/1.0.2j
[Mon Nov 27 01:15:01.046466 2017] [unique_id:info] [pid 1574] AH01566: using ip addr 192.***.**.*
[Mon Nov 27 01:15:02.000248 2017] [ssl:warn] [pid 1574] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Mon Nov 27 01:15:02.000473 2017] [ssl:info] [pid 1574] AH01887: Init: Initializing (virtual) servers for SSL

Maybe you have replaced the default ruby.
Open you terminal and enter:
sudo ln -s /System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby /usr/bin/ruby
It works for me. Hope it helps.

I have same issue, looks like apachectl is somehow broken after High Sierra update. Right now the solution for me is to control Apache daemon directly by launchctl:
sudo launchctl kickstart -r system/org.apache.httpd

Well, I've just updated the apache using brew. Then I configured my apache again and now everything works well.

Related

Apache WebDAV won't start on macOS install

I've installed Apache on macOS Monterey using brew install httpd. I've edited httpd.conf and can serve basic pages from the slightly modified DocumentRoot and default <Directory> container.
I would like to enable WebDAV but if I uncomment any of the following lines in httpd.conf and do brew services restart httpd, the server won't start anymore.
#Include /usr/local/etc/httpd/extra/httpd-dav.conf
#LoadModule dav_fs_module lib/httpd/modules/mod_dav_fs.so
#LoadModule dav_module lib/httpd/modules/mod_dav.so
The only messages I get in error_log are:
[Wed Feb 08 18:30:50.703116 2023] [core:notice] [pid 31963] AH00094: Command line: '/usr/local/opt/httpd/bin/httpd -D FOREGROUND'
[Wed Feb 08 18:31:26.805106 2023] [mpm_prefork:notice] [pid 31963] AH00169: caught SIGTERM, shutting down
What am I missing here?

Windows 10, XAMPP Apache won't start after PHP update from 7.3 to 7.4

I tried to update PHP7.3 to PHP7.4 for my XAMPP Apache on Windows 10. Now Apache won't start...
I'm using a self-signed security certificate for development.
The error message I'm getting from Apache is:
10:30:53 AM [Apache] Attempting to start Apache app...
10:30:53 AM [Apache] Status change detected: running
10:30:54 AM [Apache] Status change detected: stopped
10:30:54 AM [Apache] Error: Apache shutdown unexpectedly.
10:30:54 AM [Apache] This may be due to a blocked port, missing dependencies,
10:30:54 AM [Apache] improper privileges, a crash, or a shutdown by another method.
10:30:54 AM [Apache] Press the Logs button to view error logs and check
10:30:54 AM [Apache] the Windows Event Viewer for more clues
10:30:54 AM [Apache] If you need more help, copy and post this
10:30:54 AM [Apache] entire log window on the forums
These are the latest error log entries:
[Thu Jun 18 09:50:08.253500 2020] [ssl:warn] [pid 3120:tid 520] AH01906: www.example.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Jun 18 09:50:08.253500 2020] [ssl:warn] [pid 3120:tid 520] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Jun 18 09:50:08.278953 2020] [mpm_winnt:notice] [pid 3120:tid 520] AH00354: Child: Starting 150 worker threads.
I followed this tutorial:
https://medium.com/oceanize-geeks/how-to-upgrade-lower-version-to-latest-php-version-in-xampp-on-windows-f7be9a70bbb0
download Thread Safe PHP version from http://windows.php.net
unzip, rename folder to PHP
rename php folder in XAMPP (so mine is now php_7.3)
insert new php folder
inside this new php folder, I renamed php.ini.development to php.ini
then I replaced the PHP module lines in my httpd-xamp.conf as follows:
LoadFile "D:/xampp/php/php7ts.dll"
LoadFile "D:/xampp/php/libpq.dll"
LoadModule php7_module "D:/xampp/php/php7apache2_4.dll"
I'm not sure what to do and concerned that I will just mess it up even more... Help is very much appreciated! I really need Apache to work...
EDIT:
Here's today's complete error log:
[Thu Jun 18 09:50:07.558720 2020] [ssl:warn] [pid 17248:tid 512] AH01906: www.example.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Jun 18 09:50:07.559723 2020] [ssl:warn] [pid 17248:tid 512] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Jun 18 09:50:07.611001 2020] [core:warn] [pid 17248:tid 512] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Thu Jun 18 09:50:07.613027 2020] [ssl:warn] [pid 17248:tid 512] AH01906: www.example.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Jun 18 09:50:07.613027 2020] [ssl:warn] [pid 17248:tid 512] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Jun 18 09:50:07.648936 2020] [mpm_winnt:notice] [pid 17248:tid 512] AH00455: Apache/2.4.41 (Win64) OpenSSL/1.1.1c PHP/7.3.11 configured -- resuming normal operations
[Thu Jun 18 09:50:07.648936 2020] [mpm_winnt:notice] [pid 17248:tid 512] AH00456: Apache Lounge VC15 Server built: Aug 11 2019 12:20:04
[Thu Jun 18 09:50:07.648936 2020] [core:notice] [pid 17248:tid 512] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Thu Jun 18 09:50:07.655110 2020] [mpm_winnt:notice] [pid 17248:tid 512] AH00418: Parent: Created child process 3120
[Thu Jun 18 09:50:08.205628 2020] [ssl:warn] [pid 3120:tid 520] AH01906: www.example.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Jun 18 09:50:08.206625 2020] [ssl:warn] [pid 3120:tid 520] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Jun 18 09:50:08.253500 2020] [ssl:warn] [pid 3120:tid 520] AH01906: www.example.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Thu Jun 18 09:50:08.253500 2020] [ssl:warn] [pid 3120:tid 520] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Jun 18 09:50:08.278953 2020] [mpm_winnt:notice] [pid 3120:tid 520] AH00354: Child: Starting 150 worker threads.
EDIT 2:
The result of running httpd.exe and httpd.exe -t command via the Windows command prompt:
"httpd.exe: Syntax error on line 537 of C:/xampp/apache/conf/httpd.conf: Syntax error on line 17 of C:/xampp/apache/conf/extra/httpd-xampp.conf: Cannot load D:/xampp/php/php7ts.dll into server: The specified module could not be found."
Line 537 in httpd.confis:
# XAMPP settings
Include "conf/extra/httpd-xampp.conf"
Line 17 in http-xampp.conf is:
LoadFile "D:/xampp/php/php7ts.dll"
Further research led me to this question about php7ts.dll: php7ts.dll cannot load into server
So I ran the commands httpd.exe -v and php.exe -v.
The result is that they're both the 64-bit version, I think:
C:\xampp\apache\bin>httpd.exe -v
Server version: Apache/2.4.41 (Win64)
Apache Lounge VC15 Server built: Aug 11 2019 12:20:04
C:\xampp\apache\bin>php.exe -v
PHP 7.4.7 (cli) (built: Jun 9 2020 13:36:15) ( ZTS Visual C++ 2017 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
Confirm your confirm php7ts.dll file location and use same in apache httpd configuration file.
You can check if the settings of apache are correct:
Open command prompt and navigate to your apache installation bin folder: cd C:/xampp/apache/bin
Then run the following command to see if the syntax is OK:
httpd.exe -t

Docker error: Error response from daemon: Mounts denied: on OS X

I've currently a problem and can't find a solution. I've created an apps folder in my document directory of my user and set it as apps path in the config. When I try to run the docker I get following error:
Error response from daemon: Mounts denied: The path
/users/username/documents/development/docker-apps is not shared from
OS X and is not known to Docker. You can configure shared paths from
Docker -> Preferences... -> File Sharing.
I've added the /Users in the preferences globally but the issue is still there:
When I try to add the path I get an error massage that it's not possible because I've added the /Users globally.
My research ended with no helpful answers so I would really appreciate if you can help me with this problem.
I've found the problem. It seems that OS X with Docker has a problem with the path. On Linux all works fine but in OS X not. So when you write this here in the terminal, it will work but not in the Docker:
/users/username/documents/development/docker-apps
So when you add another / at the end like this:
/users/username/documents/development/docker-apps/
it will work.
For MacOS Docker 3.0 or higher answer provided by
François Alexandre
Docker: Mounts denied. The paths ... are not shared from OS X and are not known to Docker
"With the new version 3.0.0 of Docker for mac, you need to disable use
gRPC FUSE for file sharing in Preferences>Experimental Features."
For me it was running docker run shell script as sudo that resolved the issue.
IND00237:dispatcher-sdk-2.0.22 rahul.saini$ ./bin/docker_run.sh ./out host.docker.internal:4503 8080
docker: Error response from daemon: Mounts denied:
The paths /users/rahul.saini/aem-cloud-sdk/aem-sdk-2020.6.3766.20200619T110731Z-200604/dispatcher-sdk-2.0.22/out/vhosts_conf and /users/rahul.saini/aem-cloud-sdk/aem-sdk-2020.6.3766.20200619T110731Z-200604/dispatcher-sdk-2.0.22/out/custom_vars and /users/rahul.saini/aem-cloud-sdk/aem-sdk-2020.6.3766.20200619T110731Z-200604/dispatcher-sdk-2.0.22/out/global_vars and /users/rahul.saini/aem-cloud-sdk/aem-sdk-2020.6.3766.20200619T110731Z-200604/dispatcher-sdk-2.0.22/out/rules_any and /users/rahul.saini/aem-cloud-sdk/aem-sdk-2020.6.3766.20200619T110731Z-200604/dispatcher-sdk-2.0.22/out/filters_any and /users/rahul.saini/aem-cloud-sdk/aem-sdk-2020.6.3766.20200619T110731Z-200604/dispatcher-sdk-2.0.22/out/rewrite_rules and /users/rahul.saini/aem-cloud-sdk/aem-sdk-2020.6.3766.20200619T110731Z-200604/dispatcher-sdk-2.0.22/out/farms_any and /users/rahul.saini/aem-cloud-sdk/aem-sdk-2020.6.3766.20200619T110731Z-200604/dispatcher-sdk-2.0.22/out/clientheaders_any and /users/rahul.saini/aem-cloud-sdk/aem-sdk-2020.6.3766.20200619T110731Z-200604/dispatcher-sdk-2.0.22/out/virtualhosts_any
are not shared from OS X and are not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.
.
ERRO[0000] error waiting for container: context canceled
IND00237:dispatcher-sdk-2.0.22 rahul.saini$ sudo su
Password:
sh-3.2# cd /Users/rahul.saini/aem-cloud-sdk/aem-sdk-2020.6.3766.20200619T110731Z-200604/dispatcher-sdk-2.0.22/
sh-3.2# ./bin/docker_run.sh ./out host.docker.internal:4503 8080
Running script /docker_entrypoint.d/10-check-environment.sh
Running script /docker_entrypoint.d/20-create-docroots.sh
Running script /docker_entrypoint.d/30-wait-for-backend.sh
Waiting until host.docker.internal is available
host.docker.internal resolves to 192.168.65.2
Running script /docker_entrypoint.d/40-generate-allowed-clients.sh
Running script /docker_entrypoint.d/50-check-expiration.sh
Running script /docker_entrypoint.d/60-check-loglevel.sh
Running script /docker_entrypoint.d/70-check-forwarded-host-secret.sh
Starting httpd server
[Wed Jul 01 08:05:16.270293 2020] [:notice] [pid 1:tid 140296106285960] ModSecurity for Apache/2.9.2 (http://www.modsecurity.org/) configured.
[Wed Jul 01 08:05:16.270332 2020] [:notice] [pid 1:tid 140296106285960] ModSecurity: APR compiled version="1.6.3"; loaded version="1.6.3"
[Wed Jul 01 08:05:16.270337 2020] [:notice] [pid 1:tid 140296106285960] ModSecurity: PCRE compiled version="8.42 "; loaded version="8.42 2018-03-20"
[Wed Jul 01 08:05:16.270339 2020] [:notice] [pid 1:tid 140296106285960] ModSecurity: LIBXML compiled version="2.9.8"
[Wed Jul 01 08:05:16.270341 2020] [:notice] [pid 1:tid 140296106285960] ModSecurity: Status engine is currently disabled, enable it by set SecStatusEngine to On.
[Wed Jul 01 08:05:16.341071 2020] [mpm_worker:notice] [pid 1:tid 140296106285960] AH00292: Apache/2.4.43 (Unix) Communique/4.3.4-20200424 mod_qos/11.63 configured -- resuming normal operations
[Wed Jul 01 08:05:16.341107 2020] [core:notice] [pid 1:tid 140296106285960] AH00094: Command line: 'httpd -d /etc/httpd -f /etc/httpd/conf/httpd.conf -D FOREGROUND -D ENVIRONMENT_DEV'

Can't access my CKAN installation on Amazon EC2

I followed installation guide and deployment guide and I can access CKAN site but on port 5000, not on 8080.
What have I done wrong?
--edit1--
Error log.
/var/log/apache2/ckan_default.error.log is empty.
/var/log/apache2/error.log below:
[Wed Dec 16 03:56:05.341055 2015] [core:notice] [pid 31625] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 16 05:25:00.457734 2015] [:error] [pid 32024] [client 188.68.224.62:59132] script '/var/www/html/wp/httptest.php' not found or unable to stat
[Wed Dec 16 06:46:59.218607 2015] [mpm_prefork:notice] [pid 31625] AH00171: Graceful restart requested, doing restart
[Wed Dec 16 06:46:59.367788 2015] [mpm_prefork:notice] [pid 31625] AH00163: Apache/2.4.7 (Ubuntu) mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations
[Wed Dec 16 06:46:59.367809 2015] [core:notice] [pid 31625] AH00094: Command line: '/usr/sbin/apache2'
[Wed Dec 16 06:54:00.009154 2015] [:error] [pid 966] [client 188.68.224.62:40707] script '/var/www/html/wp/httptest.php' not found or unable to stat
[Wed Dec 16 13:07:30.925196 2015] [mpm_prefork:notice] [pid 31625] AH00171: Graceful restart requested, doing restart
--edit2--
Changed everything back to how the deployment guide says.
/etc/apache2/sites-available/ckan_default.conf below
<VirtualHost 127.0.0.1:8080>
ServerName ec2-xx-xx-xx-xx.ap-southeast-2.compute.amazonaws.com
ServerAlias www.ec2-xx-xx-xx-xx.ap-southeast-2.compute.amazonaws.com
WSGIScriptAlias / /etc/ckan/default/apache.wsgi
# Pass authorization info on (needed for rest api).
WSGIPassAuthorization On
# Deploy as a daemon (avoids conflicts between CKAN instances).
WSGIDaemonProcess ckan_default display-name=ckan_default processes=2 threads=15
WSGIProcessGroup ckan_default
ErrorLog /var/log/apache2/ckan_default.error.log
CustomLog /var/log/apache2/ckan_default.custom.log combined
LogLevel info
<IfModule mod_rpaf.c>
RPAFenable On
RPAFsethostname On
RPAFproxy_ips 127.0.0.1
</IfModule>
<Directory />
Require all granted
</Directory>
</VirtualHost>
Also tried changing the 127.0.0.1:8080 to *:8080 and tried public IP address (Amazon Elastic IP) and DNS address. None of them work.
ports.conf has listen 8080 (taken out listen 80)
wsgi script and nginx config as described in guide also.
I see the "Problem loading page" on Firefox visiting the root url on port 80 but visiting 8080 just hangs and both don't have HTTP response. I can still access CKAN on port 5000.
Amazon EC2 doesn't allow connections to port 8080 by default, so could open the port if you really wanted to access it externally.
However accessing CKAN via 8080 is only for testing that the apache deployment is working, so it makes no sense to make it available externally - you can test apache is working by ssh-ing to the box and using curl.
The CKAN deployment instructions continue by telling you to install nginx as a reverse proxy, exposing CKAN on the normal port 80.

wamp on windows7 - This webpage is not available

I have been using WAMP on my localhost for a few weeks and since this morning it doesn't work.
This is the error I get when loading localhost: This webpage is not available.
Firefox error is: Unable to connect. Firefox can't establish a connection to the server at localhost.
If I try to load phpmyadmin from the wamp menu, it will return the same error.
This is my apache error log:
[Mon Sep 15 23:10:36.435939 2014] [ssl:warn] [pid 2064:tid 308] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Mon Sep 15 23:10:36.557946 2014] [mpm_winnt:notice] [pid 2064:tid 308] AH00455: Apache/2.4.9 (Win64) OpenSSL/1.0.1g PHP/5.5.12 configured -- resuming normal operations
[Mon Sep 15 23:10:36.557946 2014] [mpm_winnt:notice] [pid 2064:tid 308] AH00456: Apache Lounge VC11 Server built: Mar 16 2014 12:42:59
[Mon Sep 15 23:10:36.557946 2014] [core:notice] [pid 2064:tid 308] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.9\\bin\\httpd.exe -d C:/wamp/bin/apache/apache2.4.9'
[Mon Sep 15 23:10:36.559946 2014] [mpm_winnt:notice] [pid 2064:tid 308] AH00418: Parent: Created child process 4796
[Mon Sep 15 23:10:37.751014 2014] [ssl:warn] [pid 4796:tid 208] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Mon Sep 15 23:10:37.779016 2014] [mpm_winnt:notice] [pid 4796:tid 208] AH00354: Child: Starting 64 worker threads.
The day before having these problems I followed some instructions on how to make localhost load faster. I got to these instructions by simply googling "localhost slow" but I don't have the exact links to these things.
I do recall though, having disabling IPV6 (which I think is causing some problems now) in the regedit, by adding DisabledComponents with the value fffffff to the registry.
I've already deleted that key.
I also played around with the host file (which I believe I have reverted back to the original).
I currently only have one localhost in it (127.0.0.1). The rest are commented out.
If anyone needs more info, please let me know.
edit: I forgot to mention that when I run google app engine server, my localhost works fine with GAE applications but still doesn't budge for WAMP.

Resources