Apache Error Logs Ubuntu
Contents |
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 company ubuntu php error log Business Learn more about hiring developers or posting ads with us Ask Ubuntu Questions Tags Users ubuntu mysql error log Badges Unanswered Ask Question _ Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes linux apache error log 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 access apache error logs up vote 9 down vote favorite
Ubuntu Log File
1 My Ubuntu vitual server wen't offline. I rebooted it and now want to debug what happened. I can browse to /etc/log but if I try cd apache2 it says Permission denied. I'm sure my user account has priviliges. I also tried sudo cd apache2 which gives the the error sudo: cd: command not found How can I access the apache logs? I also tried via sftp without success PS I am new to linux and apache logs location virtual servers, but I am keen to learn everything I can. server permissions apache2 logs share|improve this question asked Feb 16 '14 at 15:44 Sam 170117 Try sudo -i then cd apache2. –Wilf Feb 16 '14 at 15:45 @Wilf it then says -bash: cd: apache2: No such file or directory –Sam Feb 16 '14 at 16:12 add a comment| 2 Answers 2 active oldest votes up vote 10 down vote accepted You need to add your username to the group adm sudo usermod -aG adm YourUserName You can then access the logfiles as normal user without sudo. share|improve this answer answered Feb 16 '14 at 17:10 rechengehirn 2,19311031 Thanks, this worked and made me able to actually browse to directory. –Sam Feb 16 '14 at 18:07 4 I had to log in / out of my user session for this permission to take effect. –Horba Jan 29 '15 at 0:15 add a comment| up vote 3 down vote Try: sudo cat /var/log/apache2/error.log share|improve this answer answered Feb 16 '14 at 16:06 wojox 5,9282551 Thanks wojox, but is there a more permanent solution? Like being able to navigate to the apache2 folder? –Sam Feb 16 '14 at 16:13 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up us
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 company php log file location Business Learn more about hiring developers or posting ads with us Ask Ubuntu Questions Tags
Apache Log Centos
Users Badges Unanswered Ask Question _ Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only
Apache Error Log Centos
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 Ubuntu clear Apache2 error log [duplicate] up vote 0 down http://askubuntu.com/questions/421684/cant-access-apache-error-logs vote favorite 1 This question already has an answer here: When using sudo with redirection, I get 'permission denied' 5 answers I am new to Ubuntu. I can find my error log here in var/log/apache2/error.log. but i couldn't clear it. i tried to change the permission to edit the content. But couldn't achieve it. Please help me to remove it. I have read some question previously asked. but it does-not help me . this one I http://askubuntu.com/questions/706128/ubuntu-clear-apache2-error-log read http://askubuntu.com/questions/574725/how-to-clear-system-logs-in-ubuntu. Here is my terminal screen-shot: permissions apache2 error-handling share|improve this question edited May 18 at 9:52 Pierre.Vriens 6671615 asked Dec 5 '15 at 5:33 Kvvaradha 1299 marked as duplicate by David Foerster, Eric Carvalho, Videonauth, RPi Awesomeness, muru May 19 at 20:15 This question was marked as an exact duplicate of an existing question. Please post text files and program output listings as text, not as images (see How do I save terminal output to a file?). –David Foerster May 18 at 8:42 add a comment| 2 Answers 2 active oldest votes up vote 0 down vote accepted Most files in /var/log are owned by root. So, if you want to modify them, you will have to use sudo. To clear the error file, give command: sudo bash -c 'echo > /var/log/apache2/error.log' If that doesn't work, then very likely the apache process keeps the file locked and you have to stop apache before you can clear the file. This goes as follows: sudo service apache2 stop sudo bash -c 'echo > /var/log/apache2/error.log' sudo service apache2 start Note: You can't use sudo echo > /var/log/apache2/error.log here, because sudo executes the echo command but the redirect to error.log is done under the process of the user, which doesn't have elevated privileges. That's why I pass the whole command to bash, which is then exec
0531 888-546-8946 +000 800 443 0025 888-546-8946 Live Chat Toggle navigation SHARED HOSTING VPS HOSTING COMPARE VPS PLANS UNMANAGED VPS MANAGED VPS CORE VPS RESELLER HOSTING CLOUD HOSTING https://www.a2hosting.com/kb/developer-corner/apache-web-server/viewing-apache-log-files DEDICATED HOSTING COMPARE SERVERS UNMANAGED SERVERS MANAGED SERVERS CORE SERVERS SOLUTIONS Search Knowledge Base Home » Knowledge Base » Developer Corner » Apache web server » Here How to view Apache log files This article describes how to view Apache log files on a dedicated server or VPS. If you're experiencing web server difficulties, or you just want to see what Apache is doing, log files should be your first error log stop. Apache records information about all visitors to your site, as well as any problems the server encounters. To do this, Apache uses two types of log files: access logs and error logs. Shared hosting accounts cannot view the raw Apache log files for the entire server. However, you can still view log file information for your own account. For information about how to view the access log for your apache error log account, please see this article. For information about how to view the error log for your account, please see this article.Table of Contents
Access logs Managed dedicated servers and VPS Semi-managed dedicated servers and VPS Error logs Managed dedicated servers and VPS Semi-managed dedicated servers and VPS More Information Access logs Apache uses the access log files to record information about every visitor to your site. You can see which files visitors view, how the web server responds to requests, and other information such as the web browsers visitors use. Managed dedicated servers and VPS If you have a managed Flex Dedicated Server or VPS, you can view the raw Apache access logs in cPanel. For more information about how to do this, please see this article. Semi-managed dedicated servers and VPS If you have a semi-managed Flex Dedicated Server or VPS, you have root access. This means you can manipulate and process the Apache access log files any way you want. For example, you can log in to your server using SSH and type the following command to view the last 100 lines in the access log: sudo tail -100 /etc/httpd/logs/access_log If your server is running Debian or Ubuntu, type the following command instead: sudo tail -100 /var/log/apache2/access