Difference between revisions of ""Secure" Word Press on Amazon Linux"
Jump to navigation
Jump to search
Michael.mast (talk | contribs) |
Michael.mast (talk | contribs) |
||
Line 9: | Line 9: | ||
sudo yum -y install libselinux libselinux-utils selinux-policy-minimum selinux-policy-mls selinux-policy-targeted policycoreutils fail2ban httpd mysql mysql-server php php_mysql | sudo yum -y install libselinux libselinux-utils selinux-policy-minimum selinux-policy-mls selinux-policy-targeted policycoreutils fail2ban httpd mysql mysql-server php php_mysql | ||
sudo sed 's/selinux=0/selinux=1\ security=selinux\ enforcing=1/' /etc/grub.conf | sudo sed 's/selinux=0/selinux=1\ security=selinux\ enforcing=1/' /etc/grub.conf | ||
+ | sudo echo -e "ServerTokens Prod\nServerSignature Off" >> /etc/httpd/ | ||
sudo touch /.autorelabel | sudo touch /.autorelabel | ||
sudo reboot | sudo reboot | ||
Line 15: | Line 16: | ||
<pre> | <pre> | ||
+ | sudo service httpd start | ||
+ | sudo service mysqld start | ||
+ | |||
+ | |||
sudo chcon -R -t httpd_sys_rw_content_t /var/www/html/wp-content/uploads/* | sudo chcon -R -t httpd_sys_rw_content_t /var/www/html/wp-content/uploads/* | ||
</pre> | </pre> |
Revision as of 09:27, 22 December 2017
These instructions follow my attempts for a generally "locked down" instance for running Word Press without losing sleep.
Version I am working with before updates
Linux ip-172-26-9-250 4.9.51-10.52.amzn1.x86_64 #1 SMP Fri Sep 29 01:16:19 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
sudo yum -y update sudo yum -y install libselinux libselinux-utils selinux-policy-minimum selinux-policy-mls selinux-policy-targeted policycoreutils fail2ban httpd mysql mysql-server php php_mysql sudo sed 's/selinux=0/selinux=1\ security=selinux\ enforcing=1/' /etc/grub.conf sudo echo -e "ServerTokens Prod\nServerSignature Off" >> /etc/httpd/ sudo touch /.autorelabel sudo reboot
- After logging back in, install
sudo service httpd start sudo service mysqld start sudo chcon -R -t httpd_sys_rw_content_t /var/www/html/wp-content/uploads/*