Are log files safe to delete?
Actually you are in a better position to answer your own question. Most of these logs are systems/application logs. I suggest you do some research to try to understand what are these logs file before you delete them.
But to free up disk space, I suggest instead of deleting, you should truncate these log file.
> /var/log/user.log
> /var/log/apache2/error.log
You can read more on rm vs truncate pro and cons.
How to make Apache stop log some my Urls
Thanks to Nick and Tarun. I resolved my problem.
In my .htaccess
file, I add some configs:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^automate/phpfile1/(.*) ?call=phpfile1. processSomething&module=$1
RewriteRule ^automate/phpfile2/(.*) ?call=phpfile2.processSomethingElse&module=$1
</IfModule>
And in my httpd-vhosts.conf
file, I set like below:
SetEnvIf Request_URI "^/automate/phpfile1/" dontlog
SetEnvIf Request_URI "^/automate/phpfile2/" dontlog
CustomLog "logs/myapp.com-access.log" combined env=!dontlog
So, apache doesn't logging Uris :D
Related Topics
Shell Script to Shutdown/Restart Linux System
What Algorithm How to Use to Generate a 48-Bit Hash for Unique MAC Addresses
Lkm: Last Block Written to Device
How to Detect Whether Tomcat and Ant Are Installed on Linux Machine
Raspberry Pi: Spi Not Working, Spi_Bcm2835 Not Showing with Lsmod
How Does Iwlist() Command Scans The Wireless Networks
Communication Between Linked Docker Containers
How Does Ltrace() Display Rand()
How to Access Google Drive from Cli Cyberduck
Number of Subdirectories in a Directory
Monodevelop - Runs Only Using Sudo
Reliable Bidirectional Communication to a Linux Process
How to Solve Libusb_Error_Busy on Raspberry Pi (Debian) Running Node.Js
Bash Exit Script from Inside a Function
How to Introspect Normal World from Secure World Using Trustzone