Chapter 11: Application Hosting — WordPress, Flask and Express
Practice Questions and Lab Exercises
- List the steps to install WordPress on a LAMP server.
- Why does WordPress need
AllowOverride Allon Apache? What is the Nginx equivalent? - What SELinux changes are needed for WordPress on CentOS Stream 9 and why?
- Why shouldn't you use the Flask development server in production? What does
wsgi:appmean? - Explain the Nginx
location /static/block withalias. - What is pm2 cluster mode? What is the difference between
pm2 restartandpm2 reload? - Lab: Install WordPress on Ubuntu with Apache, attach an Elastic IP first, and publish a post.
- Lab: Install WordPress on Amazon Linux 2023 with Nginx + PHP-FPM.
- Lab: Deploy the Flask demo, then change the template, push/pull, and restart the service.
- Lab: Deploy the Express demo with pm2 cluster mode; reboot the instance and prove it came back automatically.
Quick Revision
- WordPress = PHP + MySQL: install stack → create DB/user → download →
wp-config.php+ salts → ownership (www-data/apache) → vhost withAllowOverride All(or Nginxtry_files ... /index.php?$args) → browser install. Use an Elastic IP. - Flask: venv → Gunicorn (
wsgi:app, 2×CPU+1 workers) → systemd → Nginxproxy_pass+/static/alias. - Express: NodeSource → pm2 (ecosystem file, cluster mode,
startup,save) → Nginx upstream + proxy. - CentOS:
httpd_can_network_connect,httpd_sys_rw_content_tfor writable folders.