Skip to content
Back to skills

Apache Lamp Config

ASecurity

Configuration for Virtual Hosts, .htaccess, and PHP-FPM in LAMP stacks.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
devopsphpdockersecurityperformance

Security analysis

A100/100

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill apache-lamp-config --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Apache Lamp Config?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Apache Lamp Config
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-apache-lamp-config/badge)](https://www.skillsdirectory.com/skills/david-li0406-apache-lamp-config)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: apache-lamp-config
description: Configuration for Virtual Hosts, .htaccess, and PHP-FPM in LAMP stacks.
---

# Apache & LAMP Config

## When to use this skill
- Configuring local development environments (MAMP, XAMPP, Docker + Apache).
- Managing `.htaccess` files.
- Troubleshooting rewrite rules.

## 1. Virtual Hosts
- **Structure**: One file per site in `sites-available`, symlinked to `sites-enabled`.
- **DocumentRoot**: Point to the `public/` directory, not the project root (security).
- **Directory**: Allow overrides:
  ```apache
  <Directory "/var/www/site/public">
      AllowOverride All
      Require all granted
  </Directory>
  ```

## 2. .htaccess Best Practices
- **Rewrites**: Standard pattern for front controllers (Laravel/Symfony):
  ```apache
  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^ index.php [L]
  ```
- **HTTPS**: Force HTTPS if not handled by a reverse proxy.

## 3. PHP-FPM
- **Timeouts**: Increase `max_execution_time` and `memory_limit` only for specific heavy jobs, not globally.
- **Opcache**: Enable Opcache in production for performance.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…