The issue
Now, I am a complete n00b on Apache, and I could certainly use some help with my current issue. I have installed the httpd rpm's on 3 different systems (all Advantech computers, 1 Box PC, 1 Advanced TCA blade, 1 Compact PCI blade, and all have RHEL6 installed). I have configured Apache with files used earlier, on other installations. When I issue the command
# service httpd restart
All goes well and I get this output:
Stopping httpd: [ OK ]
Starting httpd: httpd: apr_sockaddr_info_get() failed for <PC_Name>
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[ OK ]
Now, when I try to connect to the machine via Apache, I get the log-in screen asking for the username and password, as you would expect. However, it fails to log-in. When I look at the error_log in /var/log/httpd/, it shows this error message:
[Thu Sep 15 14:24:40 2011] [error] [client 192.168.10.175] (13)Permission denied: Could not open password file: /etc/shadow
[Thu Sep 15 14:24:40 2011] [error] [client 192.168.10.175] PAM: user 'root' - not authenticated: System error
It seems to me that this is either a configuration error, or it has something to do with permissions. Yet I can't seem to find out which. Another interesting fact is, that this only applies to the last two installations(Advanced TCA & Compact PCI), and not the first (Box PC), while all 3 installations are exactly the same.
Additional Info
The way I installed it was install httpd from yum,
# yum install httpd
Next install mod_auth_pam, which is needed by the configuration,
# yum install mod_auth_pam
Then I configured Apache with the files I got from previous installations (which basically is just replacing the configuration files from the standard Apache install), and after that I restarted the Apache service.
For this error "apr_sockaddr_info_get() failed"
You need to properly set your hostname.
hostname actual-non-expired-domain-name.com
Don't forget to set the name in your httpd.conf and in /etc/hosts as well.
I have been able to solve this by setting SELinux to allow Apache requests. This is done by issuing the following command:
semanage permissive -a http_t
Semanage is a utility from the policycoreutils-python package. This should come with the installation medium.
Related
I followed the guide on https://blog.ssdnodes.com/blog/installing-nextcloud-docker/ and got the docker containers running.
I changed the port mappings of nextcloud-proxy to 7443:443, 780:80, since my server already has an apache running.
When I open the page foo.bar.com:7443, it shows me a server error 500 page by nginx.
docker logs --details nextcloud-proxy only shows me, that the error-500-page was successfully delivered.
docker logs --details nextcloud-app does not show any errors regarding the request. It only shows some messages during startup:
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.19.0.5. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.19.0.5. Set the 'ServerName' directive globally to suppress this message
[Mon Mar 04 19:23:01.413561 2019] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.25 (Debian) PHP/7.2.15 configured -- resuming normal operations
[Mon Mar 04 19:23:01.413653 2019] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
It is pretty clear, that there is an error with apache or php (both should be logged by nextcloud-app). But I need to see the error log entries. How do I do this?
Logs are redirected to nextcloud's data folder.
From your nextcloud's root, try with:
$ tail nextcloud/data/nextcloud.log
(or the folder you set for data storage).
It's even better if you run the nextcloud with this switch to mount it to a folder on your host, edit config/config.php to have finer-grained logs through setting loglevel, the run tail -f data/nextcloud.logs
docker run -v ~/Projects/nextcloud:/var/www/html -d -p 8080:80 nextcloud
<?php
$CONFIG = array (
'htaccess.RewriteBase' => '/',
...
...
...
'loglevel' => 0,
);
Restart the docker image by running docker restart YOUR_INSTNANCE_ID
Then docker exec -it YOUR_INSTNANCE_ID bash -c "tail -f /var/www/html/data/nextcloud.log"
In my case, it helped to configure Nextcloud to use stdout instead of a dedicated logfile for its logging output.
This allows you to see all the logs instead of just the php fpm output in the if you execute docker logs <yourcontainerid> or view it in Portainer or some other management software.
Just add the following to your config.php
"logfile" => "/dev/stdout",
I am using LAMP server on a raspberry pi and my apache server has stopped displaying the website (page).
I have already tried restarting the server and my whole Pi
it is a rasperry pi 3 and the apache version is 2.0 the other components of the lamp server are working
I entered this command in terminal
sudo apache2
and it gave me this:
[Sun Dec 23 10:38:11.948939 2018] [core:warn] [pid 2061] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot
You must launch it with its service, not directly with its executable.
sudo systemctl start apache2
I'm trying to setup Apache (httpd) with mod_wsgi to run a single Django site.
(13)Permission denied: httpd: could not open error log file /var/mail/django-error-log.
Unable to open logs
I've already done: chown apache django-error-log to make sure the ownership is set to apache and verified it with ls -l
ls -l
total 0
-rw-r--r--. 1 apache root 0 Jan 10 01:40 django-error-log
Any idea what's causing the permission denied?
Highly possible you have SELinux Enforcing.
Just disable it (SELINUX=disabled) and try again.
1.) vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
2.) And then "reboot"
3.-) Try again
You can use "getenforce" command to verify the current status, as follows:
[root#instance-1 selinux]# getenforce
Disabled
[root#instance-1 selinux]#
Regards
I upgraded to OS X Mavericks and I am trying to start the apache web server
I am using the command
sudo apachectl start
to start the server but I get the following error
(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
With AMPPS or any other app, you can run it through Terminal:
Start
$ sudo /Applications/AMPPS/apache/bin/apachectl start
Stop
$ sudo /Applications/AMPPS/apache/bin/apachectl stop
had the same thing this morning, out of the blue..
I found that running :
sudo /Applications/AMPPS/apache/bin/apachectl start
at least gave me some info :
AH00544: httpd: bad group name administration
so I typed (in terminal)
groups
to see which groups were available and found that there is no administration group but there is admin group
so I went into httpd.conf and found the user/groups config section and changed accordingly
and -surprise!- apache started!
Here is what u can do.
Make sure the server is turned on with sudo ( root ) but I assume this is going just fine since u are using sudo in your start post.
The other way to solve this is to check in your
/etc/apache2/httpd.conf
And change the listen port from 80 into 8080 or anything greater than 1024
Official Bug Fix is here, so you can manage it from UI.
Also sudo apachectl start/stop is for apache bundled with Mac OS X.
Type the whole path as suggested by Daniel above.
Have a read of this blog post
It sounds like you're not seeing the same "silent terminating" thing, but maybe you have a similar problem, that with Maveriks superfluous "Listen 80" line in another config file will now trip up apache. So check if you have a config file under /etc/apache2/users , and also check VirtualHosts which maybe configured in /etc/apache2/extra/httpd-vhosts.conf (or try temporarily disabling these)
Another service is running on the port 80.
Check the service by execute this command:
sudo lsof -i :80
Stop the service before you run start the apachectl.
Can someone please assist me.
I am trying to find a log on an Ubuntu server that will show me a history of dates and times when Apache was restarted.
Ubuntu version: Ubuntu 10.04.3 LTS
Apache version: 2.2.14 (Ubuntu)
Thanks - Mike
apache usually logs to /var/log/apache2 - depending on what log rotation/cleaning you have going on there should at least be an access_log and an error_log (names may change depending on apache config). In each you should be able to see restart messages.
You could search for configured keyword in apache error logs:
### for centos/redhat:
egrep -irn 'configured' '/var/log/httpd/error_log'
### for ubunto:
egrep -irn 'configured' '/var/log/apache2/error_log'
When we start or restart the apache, we get the logs in /var/log/apache2/error_logs with the word caught SIGTERM, shutting down
So we can find the error_logs with word SIGTERM, will get if apache service start|restart