Could Not Open Error Log File /etc/httpd/logs/error_log
Contents |
Forums Hosting Security and Technology Another apache problem..won't start! If this is your httpd: could not open error log file first visit, be sure to check out the FAQ by
Unable To Open Logs Httpd Start
clicking the link above. You may have to register before you can post: click the register could not open configuration file /etc/httpd/conf/httpd.conf permission denied link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 15 of (2)no such file or directory: httpd: could not open error log file 15 Thread: Another apache problem..won't start! Tweet Thread Tools Show Printable Version Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 12-22-2006,02:50 AM #1 sir_han View Profile View Forum Posts View Forum Threads Junior Guru Join Date Jul 2003 Posts 180
Unable To Open Logs Action 'start' Failed
Another apache problem..won't start! Just got a new Linux server (CentOS 4.3 w/ Webmin 1.310) and trying to host sites on there. I'm having problem with my apache not starting. Here is the error: [[emailprotected] ~]# service httpd stop Stopping httpd:......................[FAILED] [[emailprotected] ~]# service httpd start Starting httpd: [Thu Dec 21 22:43:16 2006] [warn] NameVirtualHost xx.xx.xxx.xx:0 has no VirtualHosts (2)No such file or directory: httpd: could not open error log file /etc/httpd/logs/error_log. Unable to open logs..........................[FAILED] [[emailprotected] ~]# Here is an example of the virtualhost in the httpd.conf file: NameVirtualHost xx.xx.xxx.xx.xx
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 unable to open logs apache company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions starting httpd: no listening sockets available, shutting down Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million
Ah00015: Unable To Open Logs
programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Permission denied: httpd: could not open error log file /etc/httpd/logs/error_log up vote 1 down vote favorite When I want to http://www.webhostingtalk.com/showthread.php?t=571527 restart the httpd searvice on centOS 6.7 I have the following error: /etc/init.d/httpd restart Stopping httpd: [FAILED] Starting httpd: (13)Permission denied: httpd: could not open error log file /etc/httpd/logs/error_log. Unable to open logs [FAILED] This is error_log: ls -Z /etc/httpd/logs/error_log -rw-r--r--. root root unconfined_u:object_r:var_t:s0 /etc/httpd/logs/error_log I disabled selinux also. What is the problem? php apache httpd.conf selinux share|improve this question asked Mar 8 at 7:44 MLSC 2,78711446 add a comment| 2 Answers 2 http://stackoverflow.com/questions/35861728/permission-denied-httpd-could-not-open-error-log-file-etc-httpd-logs-error-lo active oldest votes up vote 2 down vote httpd runs probably as user apache of user httpd. Your log is owned and only writable by root. Change ownership of your logfile to make this work. This should do the trick: ~# chown apache.apache /etc/httpd/logs/error_log share|improve this answer edited Mar 8 at 8:51 answered Mar 8 at 8:01 Bart Friederichs 19.9k54387 add a comment| up vote 1 down vote Probably you should change the group of that forder to apache, it's not recommended to have root as owner of server stuff. Anyway apache should change that on his own after http starts... From httpd Wiki: Before we start, we need to be aware that the Apache HTTP server (httpd) runs as a particular user and group. On Linux as well as most other Unix-like systems, httpd is started as the "root" user; UID=root, GID=root. This is necessary because only this user can bind to port 80 and 443 (anything below 1024 in fact). After http starts and binds to its ports (defined by the Listen statments in httpd.conf), it changes user to that specified in httpd.conf. Typically: User: apache Group: apache Note that Debian based systems, including Ubuntu, use "www-data" instead. As a possible solution you should add yourself into the group apache usermod -a -G apache (username) T
[x] First Last Prev Next This bug is not in your last https://bz.apache.org/bugzilla/show_bug.cgi?id=43502 search results. Bug43502 - Verify that log directories exist in httpd http://serverfault.com/questions/590012/why-cant-apache-create-log-files -t config test Summary: Verify that log directories exist in httpd -t config test Status: NEW Product: Apache httpd-2 Classification: Unclassified Component: Core Version: 2.5-HEAD Hardware: All All Importance: P2 enhancement with 6 votes (vote) TargetMilestone: --- Assigned To: Apache HTTPD Bugs Mailing List could not URL: Keywords: PatchAvailable Depends on: Blocks: Show dependency tree Reported: 2007-09-28 02:11 UTC by David Fraser Modified: 2016-01-08 14:01 UTC (History) CC List: 4 users (show) aeoris anthony.geoghegan apache takashi.asfbugzilla Attachments use test_config to check if errorlog can be opened (1.23 KB, patch) 2008-07-18 03:41 UTC, rahul Details | Diff Checks error logs and could not open custom logs for the main host (2.78 KB, patch) 2009-02-19 06:10 UTC, David Fraser Details | Diff Checks error logs and custom logs with relative paths for the main host and virtual hosts (3.52 KB, patch) 2009-02-19 06:44 UTC, David Fraser Details | Diff Checks error logs and custom logs with relative paths for the main host and virtual hosts, ignoring pipes (3.69 KB, patch) 2009-02-19 12:48 UTC, David Fraser Details | Diff Show Obsolete (3) View All Add an attachment (proposed patch, testcase, etc.) Note You need to log in before you can comment on or make changes to this bug. Description David Fraser 2007-09-28 02:11:47 UTC If httpd is configured to log to a file in a non-existing directory, it refuses to start up, e.g.: [Fri Sep 28 03:58:13 2007] [notice] caught SIGTERM, shutting down (2)No such file or directory: httpd: could not open error log file /etc/httpd/logs/mailman/error_log. Unable to open logs It's useful when restarting Apache to check if any configuration
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 company Business Learn more about hiring developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. 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 Why can't apache create log files? up vote 1 down vote favorite I have a simple LAMP stack on CentOS setup. Apache is setup with vhosts and each developer has their web files inside their user folder. The directory structure is like so (for the user test): /home/test |_ apache |_ domain1.com |_ backups |_ conf |_ vhost.conf |_ logs |_ errors.log |_ images.log |_ web.log |_ private |_ public The vhost config is in the vhost.conf file. The log files in logs don't exist when the config is first setup, and this throws an error with apache when I run service httpd restart: (13)Permission denied: httpd: could not open error log file /home/test/apache/domain1.com/logs/error.log. Unable to open logs I tried running httpd -X as root and it created the log files (with root ownership/group). I thought it would be a case of making sure that the files are there, with group set as apache and writeable (so I don't have to make the whole directory belong to apache group and writeable), but this confuses me: [root@dev logs]# ls -al total 16 drwxr-xr-x. 2 test developers 4096 Apr 18 21:02 . drwxr-xr-x. 8 test developers 4096 Apr 18 20:25 .. -rw-r--r--. 1 test developers 1818 Apr 18 21:02 error.log -rw-r--r--. 1 test developers 14 Apr 18 20:25 .gitignore -rw-r--r--. 1 test developers 0 Apr 18 20:54 image.log [root@dev logs]# service httpd restart Stopping httpd: [ OK ] Starting httpd: [FAILED] [root@dev logs]# touch web.log [root@dev logs]# chown test:developers web.log [root@dev logs]# service httpd restart Stopping httpd: [FAILED] Starting httpd: [ OK ] I'm confused because apache runs as user apache and shouldn't have write access on the logs, should i