Apache crashing and stopped working [closed] - apache

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
EDIT: NEW ERROR: [Fri Apr 10 00:31:01.708007 2015] [ssl:warn] [pid 4720:tid 272] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name And yes the old one is still there.. just this now happens after it has crashed and I have started apache again..
I have recently installed xampp 4 times and each of them times it has been on a fresh installation of windows. With nothing but dropbox , notepad++ , and xampp it self installed on the system. I have tried everything to resolve it and below is a list of things I have tried
Running the control panel as administrator
Turning off the windows firewall
Trying it on a fresh installation of windows
Something else you may need to know is I have changed the htdocs location to C:\Dropbox\Website into the dropbox website folder inside the dropbox folder. I have also tried changing the 443 port to 444 but I can't change the 80 to 8080 because it would mean doing my ip then :8080 on the end which I can't do on cloudflare. The error log is always the same when it has crashed and displays the exact same things... Before it did display something about Threads per child and I did change it, but still no luck... after doing it on a new fresh copy of windows its still crashing but with a different error.
[Fri Apr 10 00:10:10.818359 2015] [ssl:warn] [pid 4492:tid 272] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Apr 10 00:10:10.982421 2015] [ssl:warn] [pid 4492:tid 272] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Fri Apr 10 00:10:11.051757 2015] [mpm_winnt:notice] [pid 4492:tid 272] AH00354: Child: Starting 150 worker threads.
That's not all the error log, but thats what keeps ending up in there once its crashed all the time.

Do this and your problem might get fixed:
On the file you uploaded:
Search for and replace it with
Search for ServerName www.example.com:443 and replace it with ServerName www.example.com
Let me know if this works. I hope this helps.

Related

MAMP: Apache Server is shut down automatically in Windows 10

OS: Windows 10
MAMP: 4.1.1
After installation, every time I run the program, Apache light goes green for a second and then turns off automatically. MySQL runs fine though.
The log file located at C:\MAMP\logs\apache_error.log contains these lines.
[Fri Jan 17 18:03:42 2020] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Fri Jan 17 18:03:43 2020] [warn] pid file C:/MAMP/bin/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Fri Jan 17 18:03:43 2020] [notice] Digest: generating secret for digest authentication ...
[Fri Jan 17 18:03:43 2020] [notice] Digest: done
I find a lot of people online encountered the same situation as mine. But I cannot find out the solution. So I come here to find the potential solution.
P.S. I don't have the common Port 80 confliction problem. So I'm sure my problem is not related to it.
Navigate to C:\MAMP\conf\apache\extra.
Edit the httpd-ssl.conf and comment the following line:
...
SSLSessionCache shmcb:/some/example/path/ssl_scache(512000)
...
To:
...
# SSLSessionCache shmcb:/some/example/path/ssl_scache(512000)
...
Also, check out https://cwiki.apache.org/confluence/display/HTTPD/SSLSessionCache for more info. Hope this helps.

Anyone succeeded to Install Laravel on Apache2 with fcgi?

I have successfully installed Laravel on Apache2 with php as a module. The instructions are simple. However, when I try with fcgi it does not work. So it has to do with the server configuration. After I visited http://<mylaraveldomain> (domain not public), I looked at /var/log/apache2/error.log and got this error message
[Thu Mar 26 22:52:34.012794 2015] [fcgid:warn] [pid 30834] (104)Connection reset by peer: [client 65.92.253.153:7785] mod_fcgid: error reading data from FastCGI server
[Thu Mar 26 22:52:34.012862 2015] [core:error] [pid 30834] [client 65.92.253.153:7785] End of script output before headers: php-fcgi-wrapper
[Thu Mar 26 22:52:39.826939 2015] [fcgid:error] [pid 30830] mod_fcgid: process /var/www/default/cgi-bin/php5-default/php-fcgi-wrapper(31115) exit(communication error), get unexpected signal 11
I also looked at all other log files in /var/log recently modified after visiting the URL, but no additional useful info was found. Should I look elsewhere? It is not that fcgi is not working, because if I put a file test.php in laravel public folder I can read it fine at the URL http://<mylaraveldomain>/test.php. Is there some special configuration settings to make laravel works with fcgi ? It is possible that it is specific to my installation of fcgi. So, I would like to know if others have succeeded to install laravel with fcgi on apache2. I am on Ubuntu and I made a recent apt-get upgrade.
I checked syslog and there was additional info. I could see a segment fault. I guessed it could be cache management issue. I commented out the line zend_extension=opcache.so in the file /etc/php5/apache2/conf.d/05-opcache.ini and it worked. Of course, this is only a work around.

Localhost is not working

I spend a day this issue, and I can't fix it.
Everytime I try to access to my localhost or by typing 127.0.0.1, the browser that I'm using is returning an error like : "Firefox can not find the server address at www.localhost.com."(i'm french, I translated the issue).
The same issue occures in Google Chrome and with 127.0.0.1. I tried with XAMPP and WAMP, still nothing. My Apache httpd.conf seems good, I tried to change the port (8080, 81, 8800). It still not working. My Skype is not open nether VMware Workstation. There is no program blocking the access to port 80 or 443.
I've made a ping test with the localhost and everthing is ok, but I can't access the index page of WAMP or XAMP.
The weird thing is that I can access to localhost/phpmyadmin and other pages like that.
I think my problem is in the hosts file of Windows, but it seems ok to me :
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1 localhost
::1 localhost
Why am I thinking of the hosts file? Because my vhost in XAMPP and in WAMP are not working. Maybe I'm wrong, but this problem is driving me crazy!
Thanks for the help
If you have defined Virtual Hosts, and thats a very good idea, then you need to define the vhosts name in the HOSTS file.
For example, the hosts file:
127.0.0.1 localhost
::1 localhost
127.0.0.1 vhost1.dev
::1 vhost1.dev
127.0.0.1 vhost2.dev
::1 vhost2.dev
Otherwise windows has no way of knowing where to look for them.
Another possibility for localhost not working is a corrupted HOSTS file. Try deleting it and recreating it with an editor that is not notepad.
Also when you change the HOSTS file you need to restart the dmscache service 'DNS Client' by either rebooting or better still run a command window using "Run as Administrator" and do this
net stop dnscache
net start dnscache
that activates the new entries in your hosts file.
The weird thing is that I can access to localhost/phpmyadmin and other
pages like that.
Sounds to me like your hosts file is fine. There is something preventing Apache from starting up and binding to your port.
I'm not too familiar with Windows, but from the documentation:
Any errors during Apache startup are logged into the Windows event log
when running on Windows NT. This mechanism acts as a backup for those
situations where Apache is not yet prepared to use the error.log file.
You can review the Windows Application Event Log by using the Event
Viewer, e.g. Start - Settings - Control Panel - Administrative Tools -
Event Viewer.
Take a look to see what is preventing Apache from booting.
I don't now if it will help you, this is what I get in my log when I restart Apache
[Thu Jun 05 15:41:13.480163 2014] [mpm_winnt:notice] [pid 9984:tid 392] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Thu Jun 05 15:41:15.481278 2014] [mpm_winnt:notice] [pid 6728:tid 268] AH00364: Child: All worker threads have exited.
[Thu Jun 05 15:41:15.504279 2014] [mpm_winnt:notice] [pid 9984:tid 392] AH00430: Parent: Child process 6728 exited successfully.
[Thu Jun 05 15:41:20.536567 2014] [ssl:warn] [pid 9648:tid 392] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Jun 05 15:41:20.735578 2014] [ssl:warn] [pid 9648:tid 392] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Jun 05 15:41:20.757580 2014] [mpm_winnt:notice] [pid 9648:tid 392] AH00455: Apache/2.4.9 (Win32) OpenSSL/1.0.1g PHP/5.5.11 configured -- resuming normal operations
[Thu Jun 05 15:41:20.757580 2014] [mpm_winnt:notice] [pid 9648:tid 392] AH00456: Apache Lounge VC11 Server built: Mar 16 2014 12:13:13
[Thu Jun 05 15:41:20.757580 2014] [core:notice] [pid 9648:tid 392] AH00094: Command line: 'C:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Thu Jun 05 15:41:20.758580 2014] [mpm_winnt:notice] [pid 9648:tid 392] AH00418: Parent: Created child process 3700
[Thu Jun 05 15:41:21.108600 2014] [ssl:warn] [pid 3700:tid 268] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Jun 05 15:41:21.274609 2014] [ssl:warn] [pid 3700:tid 268] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Thu Jun 05 15:41:21.296610 2014] [mpm_winnt:notice] [pid 3700:tid 268] AH00354: Child: Starting 150 worker threads.
Yesterday, I managed to get rid of the [ssl:warn] [pid 3700:tid 268] AH01909, but that wasn't the problem.
In my windows event viewer, there is no change, nothing was reported at same time of the restart.
Note : I've uninstall my current antivirus (I now it's not recommanded) and my Windows firewall does't seesm to block the connection to localhost.
Ok I've done what RiggsFolly told me. I delete my hosts file and create a new one. I restart my dmscache service. After, that I decide to create a virtual host for my localhost. In my httpd.conf, I checked if the Virtual hosts were inlucde
Include conf/extra/httpd-vhosts.conf
and in my httpd-vhosts.conf I wrote :
<Directory "/xampp/htdocs">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<VirtualHost *:80>
ServerName localhost
ServerAdmin webmaster#das.com
DocumentRoot /xampp/htdocs/
<Directory "/xampp/htdocs/">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Now everything seems to work, I can create other virtual hosts with custom name in my hosts file.

Apache 2 error log only shows the error message "0"

Since a few days, my Apache 2 error log is showing a lot messages like the following (IP addresses and URIs redacted):
[Thu Dec 12 13:46:42 2013] [error] [client 111.222.333.444] 0
[Thu Dec 12 13:52:27 2013] [error] [client 222.333.444.555] 0, referer: http://www.mydomain.com/
[Thu Dec 12 13:52:27 2013] [error] [client 222.333.444.555] 0, referer: http://www.mydomain.com/
[Thu Dec 12 13:53:54 2013] [error] [client 333.444.555.666] 0, referer: http://www.mydomain.com/subdirectory/
[Thu Dec 12 13:46:42 2013] [error] [client 444.555.666.777] 0
[Thu Dec 12 13:54:07 2013] [error] [client aaaa:1111:2222:ffff::] 0, referer: http://www.otherdomain.com/subdirectory/
What is this 0? There are no other messages shown (besides sometimes some other, normal messages, but very rarely).
The IP addresses are both IPv4 and IPv6. I checked the access log for the same date/time and IP addresses. Most of the times, there was an access for the exact same moment from this IP for different URIs on my webpage. But sometimes, there wasn't an access according to the access log.
It's a shared hosting environment, so I can't access the Apache settings (but I have ssh access to my home directory if this helps). I already googled and searched the Apache documentation, but didn't found anything (it's hard to search for "0"...)
/edit: I also asked the webhoster, they said they don't know what it's causing. I cross checked it with the Apache access log, these are requests to PHP scripts (mostly Joomla), but also requests to images as well as JS and CSS files. So I assume it's not a PHP script which is causing this.
If your error_log directive is unset errors will be written in your Apache log file for current VirtualHost.
So double check your PHP configuration (php.ini) or write a simple page with phpinfo()
If this is true, you should look inside your code (may be even into index.php).
Pay attention to this: usually there are two separate php.ini files for Apache /etc/php5/apache2/php.ini and CLI configuration /etc/php5/cli/php.ini.
Please also consider that, if you want change your PHP configuration, you can use ini_set function.
ini_set('error_log', '/var/log/php/error_new.log');
Remember: the destination directory must exist and your web server (or php engine) must have all permission to write into.
error_log format is not customizable, I suspect that it can be set to some higher level: debug or trace, where it can produce additional information.
Also please take into account, that error_log contains debug info from CGI/PHP/Perl scripts, so that 'zero' can be produced by some script that executed through apache as its module.

lbmethod_heartbeat:notice - No slotmem from mod_heartmonitor --error after installing apache2.4.2 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 6 years ago.
Improve this question
On starting the webserver the error_log shows
[Wed May 16 03:48:53.027372 2012] [lbmethod_heartbeat:notice] [pid 1114:tid 3075385024] AH02282: No slotmem from mod_heartmonitor
[Wed May 16 03:48:53.028312 2012] [mpm_event:notice] [pid 1114:tid 3075385024] AH00489: Apache/2.4.2 (Unix) configured -- resuming normal operations
[Wed May 16 03:48:53.028351 2012] [core:notice] [pid 1114:tid 3075385024] AH00094: Command line: '/usr/local/apache2/bin/httpd'
apache configuration:
# ./configure --prefix=/usr/local/apache2 --enable-mods-shared=all --enable-deflate --enable-proxy --enable-proxy-balancer --enable-proxy-http --with-included-apr
I am getting Forbidden You don't have permission to access / on this server error
This is the error generated in error_log
[Wed May 16 03:49:20.116317 2012] [authz_core:error] [pid 5015:tid 2946440000] [client 127.0.0.1:59386] AH01630: client denied by server configuration: /home/gowtham/webSites/ferry/
is this error because of lbmethod_heartbeat:notice ??
or there is a permissions misconfiguration on DocumentRoot directory?? but the directive's configuration is taken from a working webserver, so I think there r no mistakes in block. N i even tried giving
chown -R [apache_user:apache:group] /home/Necktwi/webSites/ferry
and /home/Necktwi got chmod -R 766
thanq
These messages are unrelated. It is common to encounter the "AH02282: No slotmem from mod_heartmonitor" message (which is not actually an error) but still have a functioning server.
Usually, you can suppress that message by commenting out the heartbeat load-balancer method module from httpd.conf (unless, of course, you are actually using it). It has been suggested that this be disabled in the default configuration, but evidently it is not yet.
#LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
It is possible that there is a problem with one of the authentication or authorization modules which is causing the server to deny requests. You might try disabling the modules beginning with "auth" in httpd.conf as well as any restrictions that you have in your configuration.