Solutions for website servers being infected with Trojans

Source: Internet
Author: User
Tags website server

The website server is always infected with Trojans, and the website header is injected with a large amount of js Code. After a long time, the solution is finally solved. The root cause of the problem is that when configuring the lampp server, 777 permissions are granted to the root directory of the website for simplicity and convenience, and hackers are allowed to access the server. The solution is to properly Configure permissions.The specific method is as follows:

1. reinstall the linux system: Select 32bit ubunt in the background
2. Download the xampp server: wget url
3. Unzip xampp: tar xvfz xampp-linux-1.7.3a.tar.gz-C/opt
Note: Use the tar-zcvf *** .tar.gz folder to compress the file.
4. start the server:/opt/lampp start
5. Set the security Password:/opt/lampp security
6. Copy the backup file from another server: scp root @ ip: File Location/file name (the file has been backed up)
7. Restore etc/extra/httpd-vhosts.conf,
8. Modify extra/httpd. conf and add the last line to the httpd-vhosts.conf
9. Modify the size limit of the data file imported from the database: extra/php. ini
10. Create a user: adduser ×××
11. Create a user group: addgroup ×××
12. Add the Working Group usermod-G groupname username to existing users.
13. Change the user chown-R user file of the website under the htdocs folder and log on to FTP using the user name and password.
14. Change the permission to upload the image directory to the 777: chmod-R 777 image folder.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.