★ Welcome to The Guardian God · V Classroom, website address: http://v.huweishen.com
★ Guardian God · V Classroom is a Web site dedicated to providing server instructional video for the Guardian God, updated weekly video.
★ This section we will lead you: Win2012 R2 apache+php security Settings
· Apache defaults to running as a system service, and running the account on the systems is very dangerous. Need to fall right and give proper reading
Write permissions.
1, this section is connected to the previous section "Apache+php installation Method" course, so Apache has been installed configuration.
2. Establish a system account to run Apache
1) Add a user, named Apache_hws;
2) Set user Apache_hws only belong to Guests Group;
3, set the Apache program directory permissions
1) In this case, the Apache program is located in the directory: "D:\Apache24"; give administrators, SYSTEM "Full Control"
permissions; give Apache_hws "Read and execute" permission;
2) "Logs" directory to Apache_hws "read/write/delete", or the Apache service will not start;
3) "Htdocs" directory (the directory where the website is stored in this course) gives Apache_hws "read/write/delete", otherwise the website
Cannot be updated (if the site does not need to be updated, then just give "read" permission);
4. Set PHP directory Permissions
1) Set PHP installation directory permissions (in this case: "C:\PHP"): Administrators, SYSTEM "Full Control";
Users "Read and execute";
2) Set the PHP temp directory permission; temp directory location by php.ini
"Session.save_path", "Upload_tmp_dir" two items specified.
• As you can see, the values for these two items are not set in this example, so the temporary files are stored by default to "C:\Windows\Temp".
This is the system directory, no need to change, keep the system default permissions can;
• If your php.ini specifies the values for these two items, be careful to adjust the corresponding directory permissions to: Administrators,
SYSTEM "Full Control"; Everyone "read/write/delete".
5. Set up Apache service
1) Set Apache service startup account to Apache_hws;
2) Restart Apache service;
6. Test results
1) Apache running account is APACHE_HWS, success down right;
2) Create a new code for <?php phpinfo ();?> 's tz.php Probe Web page.
3) PHP is running normally.
Now that this section is over, please visit the Guardian God website (www.huweishen.com) for more instructional videos.
Reprint please indicate the source (http://v.huweishen.com/video/34.html) Thank you!
[Windows Server 2012] apache+php Security Settings