Apachectl Could Not Open Error Log
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more httpd could not open error log file about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users httpd could not open error log file /etc/httpd/logs/error_log Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping apache could not open error log file each other. Join them; it only takes a minute: Sign up Apache Server: Editing httpd.conf file (permission denied) up vote 2 down vote favorite So I just recently downloaded Apache server with all of its files (httpd, apr,
Permission Denied Httpd Could Not Open Error Log File
apr-util, pcre) following the instructions dictated here: http://httpd.apache.org/docs/2.4/install.html However, after set-up, when I tried to start my Apache server, which is located in my usr/local/bin/, I was prompted with this message: [allen@allen-lnx ~]$ /usr/local/bin/apachectl start (13)Permission denied: AH00091: httpd: could not open error log file /usr/local/logs/error_log. AH00015: Unable to open logs After some research, I have found that I need to edit my httpd.conf file, which I did so earlier to allow for the correct ServerName and could not open error log file /etc/httpd/logs/error_log Listen options. However, I am unsure as to how to edit my conf file to allow for access to the "logs" directory. Notably, the command will run when I use the "sudo" command, but I would prefer to not always use that since it seems like a work around. Any help would appreciated. Thanks! Edit: I've actually noticed that I may have two httpd.conf files, which is proving to be a little troublesome. The other one is located in my root /etc/ directory (etc/httpd/conf/httpd.conf). I think my modified question now is... which one should I be keeping? Is the /etc/ version the one that is built in, as indicated by faff's comment below? Current Solution: I figured I would just accept the fact that I need to use sudo when editing this file since I need to be root. I might change it later so that I'm always running as root, but for now, sudo will suffice. apache logging permissions config share|improve this question edited Jun 19 '13 at 21:10 asked Jun 15 '13 at 20:21 Zhouster 4211918 Which Linux distribution is this? It's usually much easier to install apache via the package manager for your OS. It'll keep you updated on security patches, and it will be properly integrated with the rest of the system to ensure it's configured correctly for your setup. –faffaffaff Jun
#1 2009-05-29 11:30:14 slipper Member Registered: 2008-09-11 Posts: 28 [SOLVED] Httpd fails after reboot, not logging Hi allI have an issue with apache, it does not start after a reboot.I installed apache, customized httpd.conf and then start it and it was fine.Shut it down, then booted unable to open logs httpd start it up the following afternoon and httpd failed to start so I thought well, I'll
Could Not Open Configuration File /etc/httpd/conf/httpd.conf Permission Denied
just try the default config I guess.That didn't work either. So I checked for updates, of which there were none, and then reinstalled
Unable To Open Logs Action 'start' Failed
apache.It worked after that. So leaving everything as it was upon reinstallation, I rebooted and it has failed again.I would have checked /var/log/httpd except I have another problem: There are none? I tried setting httpd.conf to debug level http://stackoverflow.com/questions/17127553/apache-server-editing-httpd-conf-file-permission-denied as well and that has shown nothing. If anybody has any idea on what is causing the problem please let me know.. Last edited by slipper (2009-05-29 14:02:27) Offline #2 2009-05-29 11:50:02 ckristi Member From: Bucharest, Romania Registered: 2006-11-21 Posts: 225 Re: [SOLVED] Httpd fails after reboot, not logging Is httpd listed in your rc.conf startup (DAEMONS) line? Last edited by ckristi (2009-05-29 11:50:48) In love I believe and in Linux I trust Offline #3 2009-05-29 12:11:44 https://bbs.archlinux.org/viewtopic.php?id=73045 slipper Member Registered: 2008-09-11 Posts: 28 Re: [SOLVED] Httpd fails after reboot, not logging ckristi wrote:Is httpd listed in your rc.conf startup (DAEMONS) line?Nope. Only daemons in there are: network, iptables, dnsmasq, sshd, openntpd Offline #4 2009-05-29 12:28:02 ckristi Member From: Bucharest, Romania Registered: 2006-11-21 Posts: 225 Re: [SOLVED] Httpd fails after reboot, not logging Well.. if you want to start httpd at boot-time, you should add it to that list. In love I believe and in Linux I trust Offline #5 2009-05-29 12:35:02 slipper Member Registered: 2008-09-11 Posts: 28 Re: [SOLVED] Httpd fails after reboot, not logging ckristi wrote:Well.. if you want to start httpd at boot-time, you should add it to that list.I plan to, once I get it working Offline #6 2009-05-29 13:07:53 stefanwilkens Member From: Enschede, the Netherlands Registered: 2008-12-10 Posts: 624 Re: [SOLVED] Httpd fails after reboot, not logging run a httpd -tto check the syntac of the config file.*edit*to be sure, you're saying that it will start properly after install but refuses to start after a reboot. You do not have in in rc.conf so I'm assuming you're attempting to start it with /etc/rc.d/httpd start after the reboot? Last edited by stefanwilkens (2009-05-29 13:08:59) Arch i686 on Phenom X4 | GTX760 Offline #7 2009-05-29 13:12:42 slipper Member Registered: 2008-09-11 Posts: 28 Re: [SOLVED] Httpd fails after reboot, not logging stefanwilkens wr
communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the http://askubuntu.com/questions/438209/unable-to-open-logs-error-when-i-try-to-restart-apache company Business Learn more about hiring developers or posting ads with us Ask Ubuntu Questions Tags Users Badges Unanswered Ask Question _ Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top “Unable to open logs” error when I could not try to restart Apache up vote 1 down vote favorite 1 When I try to start apache I get the following error root@server11362:~# sudo /etc/init.d/apache2 restart Restarting web server apache2 (98)Address already in use: make_sock: could not bind to address 111.90.150.93:80 no listening sockets available, shutting down Unable to open logs Action 'start' failed. The Apache error log may have more information. In fact the apache log contains no more information. netstat -tulpn returns the could not open following Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 1098/mysqld tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN 1414/redis-server tcp 0 0 111.90.150.93:53 0.0.0.0:* LISTEN 1068/named tcp 0 0 111.90.150.92:53 0.0.0.0:* LISTEN 1068/named tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 1068/named tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 1194/postgres tcp 0 0 0.0.0.0:44888 0.0.0.0:* LISTEN 845/sshd tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 1395/master tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 1068/named tcp 0 0 0.0.0.0:6081 0.0.0.0:* LISTEN 1435/varnishd tcp 0 0 127.0.0.1:6082 0.0.0.0:* LISTEN 1434/varnishd tcp6 0 0 :::53 :::* LISTEN 1068/named tcp6 0 0 :::44888 :::* LISTEN 845/sshd tcp6 0 0 :::25 :::* LISTEN 1395/master tcp6 0 0 ::1:953 :::* LISTEN 1068/named tcp6 0 0 :::6081 :::* LISTEN 1435/varnishd udp 0 0 111.90.150.93:53 0.0.0.0:* 1068/named udp 0 0 111.90.150.92:53 0.0.0.0:* 1068/named udp 0 0 127.0.0.1:53 0.0.0.0:* 1068/named udp6 0 0 :::53 There is nothing on port 80 but I still cannot restart networking apache2 log share|improve this question edited Mar 23 '14 at 19:47 Radu Rădeanu 77.6k24168255 asked Mar 23 '14 at 18:56 user259920 6113 add a comment| 3 Answers 3 active oldest votes up vote 6 down vote There is possibly more broken, because you also get Unable to open logs First of all, enable more logging LogLevel debug in your /etc/a