How can I disable apache2 error logging? - apache2

In /etc/apache2/apache2.conf I have uncommented the following line:
# ErrorLog ${APACHE_LOG_DIR}/error.log
Which resulted in the following:
serv:/var/log/apache2# /etc/init.d/apache2 restart
Restarting web server: apache2 ... waiting (2)No such file or directory: apache2: could not open error log file /etc/apache2/logs/error_log.
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
failed!
How can I disable error logging of virtual hosts that contain no ErrorLog/CustomLog directive?

As you can see apache can not open log file. In this case you must change
/etc/apache2/apache2.conf
with
/etc/apache2/${APACHE_LOG_DIR}/error.log
This resolution it can be see in stating apache ubuntu forum.

Try starting apache using the following command
service apache2 start

Related

Apache 2 cannot successfully load module?

We have an older ubuntu 14 server that is currently working and has apache2 running on and I'm attempting to install an open idc module to get SSO working at our company. I know...Ubuntu 14 is old, but that's a whole other can of worms...
When I run
apachectl -M
It successfully shows auth_openidc_module (shared)
I also verified that ‘auth_openidc.conf’ is in my /etc/apache2/mods-enabled directory
However when I add
in my apache2.conf :
LoadModule auth_openidc_module module/mod_auth_openidc.so
include mods-enabled/auth_openidc.conf
<Location / >
AuthType openid-connect
Require valid-user
</Location>
and perform a 'apachectl -M' command I get the following error.
'Syntax error on line 57 of /etc/apache2/apache2.conf: Cannot load module/mod_auth_openidc.so into server: /etc/apache2/module/mod_auth_openidc.so: cannot open shared object file: No such file or directory
Action '-M' failed.'
Another point of confusion, I don't see any directory named 'auth_openidc_module' or any .so file anywhere within Apache. I have seen some posts that the .so files might be in '/usr/lib64/httpd/modules' but my lib64 directory is blank...
I'm a newbie to all of this...what am I missing?
So I don't have it working successfully yet, but I did get the error 'can't find' error fixed. The directory for modules on our server was '/usr/lib/apache2/modules/' NOT '/usr/lib64/httpd/modules'

Redis, redis fatal error can't open config file

I am running Redis on Windows and have not been able to run it using the config file.
I tried running:
redis-server 'filepath'/conf/redis.conf
but I get the error saying
"redis fatal error can't open config file"
How can I resolve this issue and have the Redis server read the config file?
For windows:
redis-server "CONFIG_FILE_PATH"
Please make sure that config and log file have file read and write permission.
You can also specify the config path for Linux in the same way.
"Fatal error, can't open config file"
Redis server might have no read privilege on this config file or config file doesn't exist.
This is an example of how I solved mine
redis-server C:/Users/<name>/Downloads/redis/64bit/redis.conf & --daemonize yes
Don't try any command, Just double click on Redis app.

How to install mod_proxy_hcheck module/extension for apache2

How to install mod_proxy check module/extension for apache2 ? I want to use all the latest mod_proxy ProxyPass parameters. Currently it is throwing compilation error saying
AH00526: Syntax error on line 8 of /etc/apache2/conf-extra/httpd-proxy-balancer.conf:
BalancerMember unknown Worker parameter
Action 'configtest' failed.
The Apache error log may have more information.
I was able to do it by executing
a2enmod proxy_hcheck

Solr: 404 error with getting admin page

I've installed Solr on my Ubuntu to this path
/opt/solr/solr-4.10.2
After installing I started Solr:
sudo bin/solr start from /opt/solr/solr-4.10.2 directory
As I can understand it started successfully
Waiting to see Solr listening on port 8983 [/]
Started Solr server on port 8983 (pid=8385). Happy searching!
But when I try to get to admin page
http://localhost:8983/solr
I got 404 error:
HTTP ERROR: 404
Problem accessing /solr. Reason:
Not Found
Powered by Jetty://
Do you have any suggestion what's going wrong and where to look in order to fix this problem?
Since this error can be caused by a lot of things, you need to access the log file and debug the execution.
First of all, open your Node log file, located in /opt/solr/solr-4.10.2/node1/log and look for something weird (Shift+F for Errors).
Generally, this error occurs when you have a mismatch between the Solr required Java JDK and your current Java JDK.
When I had this problem, I found in the log file the following error message java.lang.UnsupportedClassVersionError: org/apache/solr/servlet/SolrDispatchFilter : Unsupported major.minor version 51.0 and realized the problem was the java version.
To solve this, try to change the current JDK, using the command sudo update-alternatives --config javac.
If the error still occurs, try to uninstall all unused JDK's, because Solr is getting the wrong path.
The final solution to this issue is to open the file /opt/solr/solr-4.10.2/solar.in.sh and edit the SOLR_JAVA_HOME, writing the right JDK path (e.g /usr/lib/jvm/java-1.7.0)
Disclosure: the secret is look in the log file and figure out what is causing the issue.
Cheers.
try:
http://localhost:8983/solr/index.html
[solr's web.xml]
<servlet>
<servlet-name>LoadAdminUI</servlet-name>
<servlet-class>org.apache.solr.servlet.LoadAdminUiServlet</servlet-class>

Maven deploy artifact

I am using mvn deploy:deploy-file to upload a artifact to the remote repository.
I am having -
Apache2.2 and Maven-3.0.3
Following is the command I am using -
mvn -X deploy:deploy-file -Durl=http://myRepos.com/repo/ -DrepositoryId=repo-mine -Dfile=temp.jar -DgroupId=com.yagnaiq -DartifactId=temp -Dversion=1.0 -Dpackaging=jar -Dclassifier=test -DgeneratePom=true -DgeneratePom.description="My POM" -DrepositoryLayout=default -DuniqueVersion=false
My settings.xml contains an entry for repositoryId as-
<servers>
<server>
<id>repo-mine</id>
<username>admin</username>
<password>admin</password>
</server> </servers>
I am getting following error -
Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://myRepos.com/repo/com/yagnaiq/temp/1.0/temp-1.0-test.jar. Return code is: 500
Need help on this!
THanks!
Error 500 means something went wrong on the remote server. You should check the logs on the myrepos.com server. (Maybe it's out of disk space or something).

Resources