Apache22 Error Log Freebsd
Contents |
PHP Applications BUSINESS INTELLIGENCE Analysis Services Power BI Data Visualization SERVICES BUSINESS SERVICES IT Consulting & Advisory AGILE Project Management Customized Training DEVELOPMENT SERVICES Requirements Analysis Application Development & Management PRODUCTS SHAREPOINT Content Type Listing Data Room Document Library Listing apache22 php5 freebsd RESOURCES RESEARCH & GUIDES Blog eBooks CLIENTS Liquid Planner Login ABOUT CODEASITE Our freebsd apache22 php Team Our Approach Our Partners Blog Monday, 02 March 2009 02:50 How do I find Apache http server log files? freebsd apache22 apache24 Written by Louise Fahys Be the first to comment! From : http://www.cyberciti.biz/faq/apache-logs/ There are two type of apache httpd server log files: Error Logs All apache errors / diagnostic information other errors found
Freebsd Php Ini
while serving requests are logged to this file. Location of error log is set using ErrorLog directive. If there is any problem, you should first take a look at this file using cat, grep or any other UNIX / Linux text utilities. This apache log file often contain details of what went wrong and how to fix it. Default error log file location: RHEL / Red Hat apache error log ubuntu / 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, you can use grep command:# grep ErrorLog /usr/local/etc/apache22/httpd.conf
# grep ErrorLog /etc/apache2/apache2.conf
# grep ErrorLog /etc/httpd/conf/httpd.conf Sample output: # ErrorLog: The location of the error log file.# If you do not specify an ErrorLog directive within a ErrorLog "/var/log/httpd-error.log" Access Logs Apache server records all incoming requests and all requests processed to a log file. The format of the access log is highly configurable. The location and content of the access log are controlled by the CustomLog directive. Default apache access log file location: RHEL / Red Hat / CentOS / Fedora Linux Apache access file location - /var/log/httpd/access_log Debian / Ubuntu Linux Apache access log file location - /var/log/apache2/access.log FreeBSD Apache access log file location - /var/log/httpd-access.log To find exact apache log file location, you can use grep command:# grep CustomLog /usr/local/etc/apache22/httpd.conf
# grep CustomLog /etc/apache2/apache2.conf
# grep CustomLog /etc/httpd/conf/httpd.conf Sample output: # a CustomLog directive (see below). #CustomLog "/var/log/httpd-access.log" common CustomLog "/var/log/httpd-access.log" combined Tweet Tagged under Apache,
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 apache log location Us Learn more about Stack Overflow the company Business Learn more about hiring developers
Apache Log File Format
or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question
Apache Access Logs
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 http://blog.codeasite.com/how-do-i-find-apache-http-server-log-files up and rise to the top Can't find apache error logs up vote 3 down vote favorite It seems my server doesn't have error logs . i can't find them anywhere . in info.php file there is no mention about any error log. I tried commands like pico /usr/local/apache/logs/error_log ,but of course,no results. How can i find the apache error logs and view them ? thanks for http://serverfault.com/questions/287079/cant-find-apache-error-logs the help apache-2.2 logging share|improve this question asked Jul 5 '11 at 8:27 whitelord migrated from stackoverflow.com Jul 5 '11 at 11:16 This question came from our site for professional and enthusiast programmers. this is a perfect question for Google I think :-) –mnicky Jul 5 '11 at 8:29 ok, to help you a little bit: cyberciti.biz/faq/apache-logs ;-) –mnicky Jul 5 '11 at 8:31 thanks,but i already tried that. nothing happens. maybe i do something wrong..i am a newbie .. –whitelord Jul 5 '11 at 8:36 find your httpd.conf and try: grep 'ErrorLog\|CustomLog' httpd.conf –mnicky Jul 5 '11 at 8:42 2 On CentOS it should be /var/log/httpd/error_log and /var/log/httpd/access_log –mnicky Jul 5 '11 at 9:04 | show 9 more comments 2 Answers 2 active oldest votes up vote 6 down vote Default apache error log location, by distro's: RHEL / Red Hat / CentOS / Fedora - /var/log/httpd/error_log Debian / Ubuntu - /var/log/apache2/error.log FreeBSD - /var/log/httpd-error.log To find exact apache error log file location, you can use grep command: # grep ErrorLog /usr/local/etc/apache22/httpd.conf # grep ErrorLog /etc/apache2/apache2.conf # grep ErrorLog /etc/httpd/conf/httpd.conf Sample output: # ErrorLog: The location of the error log fi
the port Apache 2.2 can be installed from the ports with the following commands # cd /usr/ports/www/apache22 # make install You will need to add an enable line for Apache to your /etc/rc.conf file apache22_enable="YES" Apache installs a start up script in /usr/local/etc/rc.d, but to stop http://www.freebsdmadeeasy.com/tutorials/web-server/configure-apache-web-server-on-freebsd.php and start the port the apachectl command is used which we will be looking at later when it is time to start the server. Configuring Apache's httpd.conf The httpd.conf contains most all of the important configuration settings. Everything http://www.freebsddiary.org/rotatelogs.php can be done here from adding virtual hosts, to setting the log files, to setting .htm files to be parsed for php. You can open the httpd.conf file for editting with ee /usr/local/etc/apache22/httpd.conf When first getting the web error log server going you will be editting this file a lot, so its not a bad idea to create an alias for the above command in your shell. The first thing you will need to change in the file to get your server going is the ServerName to the hostname you want to use for the server. If you do not have one you can use the IP address, or localhost. This will need to be followed by apache22 error log the port number. ServerName www.yourdomain.com:80 Currently in Apache 2.2.x the default directory is /usr/local/www/apache22 instead of the old default. This should be changed to the standard directory of /usr/local/www/data in every spot. You can move the folder like this if you do not have a previous version of apache installed that has created the directory already. # mv /usr/local/www/apache22 /usr/local/www/ You can replace it easily with sarep from the ports with this command. # sarep "/usr/local/www/apache22" "/usr/local/www" httpd.conf This is enough to get the server going so that you can check that it will run, so do that now. Loading the accf_http module On FreeBSD you must load the accf_module before you can start apache, otherwise you are sure to get an httpready error. To load the module use kldload # kldload accf_http If it loaded successfully then it will not give any errors or output. To have it load on boot add this to your /boot/loader.conf file accf_http_load="YES" Starting Apache Apache is controlled with apachectl, some examples of its usage are # apachectl start # apachectl restart # apachectl graceful # apachectl stop The graceful option has the same result as restart, it just does it in a nice way as opposed to restart forcefully restarting the server. Before restarting or starting Apache it is best to run the configtest to check for errors in the httpd
quiet here. But I've been doing a lot of blogging at dan.langille.org because I prefer WordPress now. Not all my posts there are FreeBSD related. I am in the midst of migrating The FreeBSD Diary over to WordPress (and you can read about that here). Once the migration is completed, I'll move the FreeBSD posts into the new FreeBSD Diary website. Apache - rotating log files 11 January 2000 ShareNeed more help on this topic? Click hereThis article has 9 commentsShow me similar articles This article relates my experiences with rotatelogs, a utility provided with Apache, and how you can use it to rotate www logs without having to restart Apache.But since I wrote this article, I've learned how to use newsyslog.conf to do the same thing. And I like using newsyslog better. And I've also learned not to compress apache log files. What? Where'd you hear about this? I heard about it one day in Undernet's IRC channel #FreeBSD. Someone happened to mention that such a program existed. Eventually someone found it. Well, won't /etc/newsyslog.conf do this for me anyway? No, it won't. You need to HUP apache so it starts to use the new log files. Otherwise it will continue to happily write to the end of the old log file. But syslog will HUP Apache for you. See what I wrote later. How does rotatelogs work? See man rotatelogs where you'll find: TransferLog "|rotatelogs /path/to/logs/access_log 86400" So I went to /usr/local/etc/apache/httpd.conf, found the appropriate section of the file, and added the above. Here is what it looks like: