apache-lamp-config

📁 sraloff/gravityboots 📅 8 days ago
4
总安装量
4
周安装量
#53814
全站排名
安装命令
npx skills add https://github.com/sraloff/gravityboots --skill apache-lamp-config

Agent 安装分布

gemini-cli 4
github-copilot 4
codex 4
kimi-cli 4
cursor 4
amp 4

Skill 文档

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:
    <Directory "/var/www/site/public">
        AllowOverride All
        Require all granted
    </Directory>
    

2. .htaccess Best Practices

  • Rewrites: Standard pattern for front controllers (Laravel/Symfony):
    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.