Os X Apache Error Log Location
Contents |
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 el capitan apache logs posting ads with us Ask Different Questions Tags Users Badges Unanswered Ask Question _ Ask Different os x php error log is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute: Sign up Here's mac os x apache error log how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Where is the httpd error log file on Lion? up vote 25 down vote favorite 3 I'm running a
Command Line: '/usr/sbin/httpd -d Foreground'
local web (development) server on my mac with apache installed. I'm sure it depends on my apache config but basically I just want to run tail -f /var/log/httpd-error.log in a terminal so I can see the error and warnings that occur during the development of my websites. So my question is where or how do I find where this log file is placed since it is not placed in /var/log/ lion macos apache share|improve this question edited Feb 20 '12 at 14:58 apache caught sigterm, shutting down bmike♦ 116k38202444 asked Feb 17 '12 at 11:18 FLY 1,65251631 add a comment| 5 Answers 5 active oldest votes up vote 45 down vote accepted As morth pointed out, for the default Mac OS X Apache installation these are located in: /var/log/apache2/error_log. The location can be changed in the httpd config using the ErrorLog directive, even for individual virtual hosts. Also note that if you installed another Apache besides the built-in one (like through MacPorts, or MAMP), this probably is different for you too. In that case you should have a look at the httpd.conf or equivalent for your installation. tip: If you have Growl installed, also have a look at this 'growltail' script. I think it's great to get notified of errors while developing, without having the need to switch back to the Terminal all the time. share|improve this answer edited Jan 25 '13 at 15:57 FLY 1,65251631 answered Feb 17 '12 at 11:52 Gerry 11.1k33565 2 Doesn't lion use apache2 and not apache in /var/log to contain the web server logs? Also, the Console app in /Applications/Utilities is the "Cocoa" log viewer, but it's not as handy as tail for most developers other than to explore the contents of /var/log or peek at multiple logs for short durations. –bmike♦ Feb 20 '12 at 15:01 add a comment| up vote 4 down vote Is /private/var/log/apache2/error_log what you are looking for? share|improve this answer answered Feb 17 '12 at 11:43 morth 123
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 ah00169: caught sigterm, shutting down company Business Learn more about hiring developers or posting ads with us Ask Different Questions
Search Permissions Are Missing On A Component Of The Path
Tags Users Badges Unanswered Ask Question _ Ask Different is a question and answer site for power users of Apple hardware and
Mac Apache Restart
software. 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 Can't find my apache http://apple.stackexchange.com/questions/40713/where-is-the-httpd-error-log-file-on-lion error_log folder up vote 2 down vote favorite new Mac (Yosemite) and setting up a new dev environment. At the moment cannot find any error_log folder at the following paths: /var/log/apache2/error_log /private/var/log/apache2/error_log /var/log/httpd/error_log Any thoughts on where that folder may be? yosemite error apache logs share|improve this question asked Mar 12 '15 at 19:40 Leon Gaban 12317 Is apache running at all? –patrix♦ Mar 12 '15 at 19:43 @patrix I http://apple.stackexchange.com/questions/176442/cant-find-my-apache-error-log-folder did sudo apachectl restart and didn't see anything come up, so tried to check the sudo tail -f /var/log/apache2/error_log and that's where I went down this path of trying to figure out if it's running or not –Leon Gaban Mar 12 '15 at 19:46 Try to connect to the websever at localhost and/or run ps aux|grep http to see whether apache is running at all. –patrix♦ Mar 12 '15 at 19:49 Nothing is running at localhost or localhost/app and this is what I see after running ps: leongaban 10849 0.0 0.0 2432772 672 s006 S+ 2:56PM 0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=.cvs --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn http –Leon Gaban Mar 12 '15 at 19:56 No running apache, no error log :-/ –patrix♦ Mar 12 '15 at 20:00 add a comment| 1 Answer 1 active oldest votes up vote 5 down vote accepted The location of error_log is defined in /etc/apache2/httpd.conf. Run grep '^ErrorLog' /etc/apache2/httpd.conf to see the definition. share|improve this answer answered Mar 12 '15 at 19:45 patrix♦ 35k1073104 Thanks! yeah it says /private/var/log/apache2/error_log which I checked, and there was no error_log folder in there. So I went ahead and made one... fingers crossed –Leon Gaban Mar 12 '15 at 19:49 1 It's a file, not a folder! Creating a folder with the
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 http://serverfault.com/questions/398483/where-is-the-apache-access-log-file-located-mac-apache 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 http://serverfault.com/questions/187814/limit-apache-log-on-mac-os-x-10-6 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 os x answer The best answers are voted up and rise to the top Where is the Apache Access Log File located (Mac Apache)? up vote 1 down vote favorite 2 I did a little reading online, and I think that the Apache Access Log contains all of the requests sent to the server. However, I couldn't gather from the websites whether this is actually stored os x apache in an accessible text file, or in some other manner. If it is stored in a file, where is this file on the default Mac Apache install? apache-2.2 mac-osx logging share|improve this question edited Jun 13 '12 at 21:24 Sven♦ 65.1k899142 asked Jun 13 '12 at 21:09 Josh Sherick 114115 add a comment| 3 Answers 3 active oldest votes up vote 4 down vote accepted Look for 'CustomLog' and 'ErrorLog' in your Apache configuration files, which are under /etc/apache2/httpd.conf Also see the documentation, at http://httpd.apache.org/docs/current/logs.html share|improve this answer answered Jun 13 '12 at 21:38 Stefan Lasiewski 12.5k2183150 add a comment| up vote 4 down vote The default location for the access log is: /var/log/apache2/access_log The default location for the error log is: /var/log/apache2/error_log share|improve this answer edited Jun 13 '12 at 22:32 Hyppy 13.4k12254 answered Jun 13 '12 at 21:24 Sven♦ 65.1k899142 add a comment| up vote -1 down vote RHEL / Red Hat / CentOS / Fedora Linux Apache error file location - /var/log/httpd/error_log Debian / Ubuntu Linux Apache error log file location - /var/log/apache2/error.log FreeBSD Apache error log file location - /var/log/httpd-error.log To find exact apache log file location, y
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 Limit Apache log on Mac OS X 10.6 up vote 3 down vote favorite 1 Yesterday I found that my Apache log file in my development machine was almost 50 GB in size. Is there a way to limit the site of the Apache log file? apache-2.2 log-files share|improve this question edited Feb 14 '13 at 16:27 Teun Zengerink 201513 asked Oct 5 '10 at 17:12 Onema 1307 add a comment| 3 Answers 3 active oldest votes up vote 5 down vote accepted This is typically done using logrotate. Example logrotate configuration for Apache: /var/log/httpd/*log { daily rotate 30 compress missingok notifempty sharedscripts postrotate /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true endscript } share|improve this answer answered Oct 5 '10 at 17:15 Warner 19k13960 2 Mac OS 10.5 and up use newsyslog and the config file is located in /etc/newsyslog.conf. a man newsyslog and man newsyslog.conf should helped a lot!! –Onema Feb 18 '11 at 18:27 add a comment| up vote 2 down vote For Mac OS X 10.6 Snow Leopard (10.6.8), following Onema's comment (on an answer), I added this line to /etc/newsyslog.conf(5) (with reformatted whitespace): # logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] /var/log/apache2/*_log 70:70 644 5 1000 * JG /var/run/httpd.pid It instructs to rotate all logs (3 for me) 5 times each when over 1000 "kilobytes", using bzip2(1) sha