We have inherited a series of servers with a number of systems on them, all running CentOS. A bunch of these are under-utilized and may not be doing much more than idling. None-the-less, there is the possibility that a script or database is being accessed occasionally. I would like to see exactly what these servers are doing--which scripts are being run and which databases are being accessed, etc. How would you go about exploring an inherited system to see exactly what is being run/accessed?
Oren Hizkiya's questions
The content of my site is located in www.example.com/main/
. I would like to use .htaccess
to redirect users from www.example.com
to www.example.com/main/
seamlessly, preferably so that URL remains www.example.com
despite this redirection.
I've looked at http://corz.org/serv/tricks/htaccess2.php but I can't seem to figure out how to make this simple redirect. What do I need to do to make this work? Also, can you point me to a resource you've used to learn .htacess rules? I would like to learn them for the future.
I'm trying to use a .htaccess file to redirect everything from https to normal http (for reasons beyond the scope of this post).
I have tried playing the .htaccess file in the /httpdocs
directory with the content
Redirect / http://mysite.com
and Redirect * mysite.com
(the http:// should be there, but I cannot post it because "new users are limited to posting one link")
but neither of those has worked.
What am I doing wrong?
If it is helpful, I am on CentOS on a normal LAMP stack.
I have written a php script to check if there are any new files in a folder and, if any new files exist, upload them to a server. These files can be quite large. I want to run this script frequently-let's say every 5 min-as a scheduled task so that the files get moved to the server as soon as possible. However, once the script is already attempting to upload a file, I do not want it to be run again, as I am afraid the second instance will overwrite the file that is already being uploaded to the server.
How can I run the script as a scheduled task unless the script is already running?