Apache Log issue on Webmin - apache

I'm not sure when this issue first started but for at least 3 months I've not had any errors logging to the Apache log, despite knowing there are errors that should be going in there.
I'm using Webmin and I was going to set up a new log to store these errors but I'm not sure what I need to do in order to make it log Apache (PHP) errors.
I'm looking at the following site for instructions but it doesn't explicitly say anything about Apache errors and the last thing I want to do is mess with the server:
http://doxfer.webmin.com/Webmin/System_Logs

Related

Apache is Adding Javascript in HTML File

I got a strange situation where my Apache Server is adding a piece of Javascript code just before closing tag of the served HTML content.
I tried to find out but could not success what is going here on the server. I restarted the server and then it went away, but after sometime I'm facing same issue.
I'm sure my server is compromized and someone is doing this act. Kindly help me where to look to check how Apache can add such code on the fly on CentOS 7.
If you do not have set up anything like this, it's likely that your server got compromised.
As a first step, I suggest you check, if anything like this has been configured.
Beware though, if your server has been compromised, it's very likely that the attacker still maintains access to your server. If you can, nuke it, rotate credentials and look into hardening your servers.

Apache httpd: cache miss: cache unwilling to store response

I've been trying to configure my Apache Httpd 2.4 server to use mod_cache and mod_cache_disk to do caching for a Wordpress site. It should have a big improvement of performance. I have followed all the guides and done everything right, and yet... no files get saved in the cache.
I enabled logging of cache errors and I see this error coming up: "cache miss: cache unwilling to store response". Ok... I looked in the source code of mod_cache.c and it looks like that happens when cache_create_entity() returns anything other than OK. So I looked at the souce of mod_ccache_disk.c and I can see that in create_entity(), it silently fails if conf->cache_root == NULL. In all other cases, it would log an error or return OK.
I can only assume that it's failing because conf->cache_root is null. Where does that come from? It would come from ap_get_module_config to get the config of the cache_disk_module.
How can that possibly be returning null? And more annoyingly, why does the Apache server give some log message when there's a major error condition, such as loading a module but not having a config object for it?
Really stumped on this one... Thank you.
Problem solved: SELinux was blocking files from being created in the CacheRoot I specified. I had to put it in the right directory that had permissions, or I could have added permission to the directory.

Apache server "Error" message

I'm using an Apache webserver to develop a project using joomla.
Some days ago I did a backup restoration in Joomla (using Akeeba Backups) and now, whenever I try accessing, both the site's backend and frontend, I get a blank page with nothing but the word "Error".
I don't know if the backup is in anyway related to this error as I'm not that much experienced, but I haven't touched the server since then. Any help? How can I find the error's origin?

Apache2: upload restarts over and over

We are using different upload scripts with Perl-Module CGI for our CMS and have not encountered such a problem for years.
Our customer's employees are not able to get a successful download.
No matter what kind or size of file, no matter which browser they use, no matter if they do it at work or log in from home.
If they try to use one of our system's upload pages the following happens:
The reload seems to work till approx. 94% are downloaded. Suddenly, the reload restarts and the same procedure happens over and over again.
A look in the error log shows this:
Apache2::RequestIO::read: (70007) The timeout specified has expired at (eval 207) line 5
The wierd thing is if i log in our customer's system using our VPN-Tunnel i never can reproduce the error (i can from home though).
I have googled without much success.
I checked the apache timeout setting which was at 300 seconds - which is more than generous.
I even checked the content length field for a value of 0 because i found a forum entry refering to a CGI bug that related to a content length field of 0.
Now, i am really stuck and running out of ideas.
Can you give me some new ones, please?
The apache server is version 2.2.16, the perl CGI module is version 3.43 .
We are using mod_perl.
We did know our customer didn't use any kind of load balancing.
Without letting anyone else know our customers infrastructure departement activated a load balancer. This way requests went to different servers and timed out.

"Cannot locate WordPress root directory," error while updating WordPress or installing any plugins

I am running WordPress on a CentOS server with Apache and Mysql and it was running smoothly a couple of days ago but when I am trying to install any plugin or update WordPress, it gives the error with the exact statement "Unable to locate WordPress root directory".
Any suggestions are welcome because I need to install a few plugins.
This error can be caused by the wrong FTP username being given (not an incorrect password – that would be trapped nicely by wordpress – but the username).
I guess this isn’t something that is going to happen often – moving a server and so changing the FTP username – but I’m glad I thought to read around before spending hours diagnosing the server.
This could be because of the web host you are using. If you are hosting it on a free web host it could be somewhat unstable. If you really want to test wordpress out to see how it would word if it did word correctly, try using WAMP.
http://www.wampserver.com/en/