how to secure cms websites in cpanel server?
You can secure CMS websites using the below procedure :
If you allow your instructors to upload files, then you will have to take many precautions in your application as well as server side.
1. You can Secure CMS websites by keeping Upload folder outside the public_html folder and not inside it.
2. The uploading file must be checked for extension. For example, a hacker or a user might upload a hackfile renaming it as video file and once uploaded they might again rename it. Hence you must check for file extension using, javascript, MIME type and other server side scripts.
3. The uploaded file name must be renamed with date and some random prefix, so that a hacker will not be able to identify or call the file once it is uploaded
4. It is better to keep your uploading site separate from your main domain name. For example your main domain demo.com can have a sub domain which is created as a separate domain [ like test.demo.com] under whm and then whatever files that are uploaded will get uploaded in it. But users will use only demo.com. Also while calling the video file, don’t call as video file directly [ like test.demo.com/demo123.flv ] instead write a script which will load like test.demo.com/video.php?id=3d33542. This way even when a hack file is uploaded will not be identifiable.
5. Use server side tools for scanning uploaded files. However, remember uploaded files are videos and hence it will take a lot of time to scan.
6. Always scan the files and complete it before showing them to users. There must be a time delay between uploading and showing in the website.
7. Please search for commercial scanning tools which will have more options to scan such videos and implement them.
8. Always maintain upto date backup locally by copying them regularly using winscp, putty or cygwin.
9. Encrypt your websites code using Ion Cube so that hackers cannot view your source code.
10.Please avoid using admin folder names like admin, manage etc which are obvious.