fattain-naime/cwp-superpowers/cwp-webserver
- community
Checking that the SKILL.md file is still in the repository.
This skill should be used when the user asks to "configure Apache", "configure Nginx", "set up Varnish", "switch web server stack", "edit vhost template", "rebuild vhosts", "fix web server errors", "configure SSL for web server", "set up reverse proxy", "enable Brotli compression", "fix 502 bad gateway", "fix redirect loop", "manage web server modules", or needs to manage any CWP web server stack component.
Install
npx vskill@latest install fattain-naime/cwp-superpowers/cwp-webserverSKILL.md
CWP Web Server Management
Manage Apache, Nginx, Varnish, and LiteSpeed web server configurations within CWP. Handle vhost templates, module management, reverse proxy setups, and common web server issues.
Overview
Choose from multiple web server stacks. The selected stack determines how requests are processed and which configuration files to edit.
| Stack | Description | Use Case | |
|---|---|---|---|
| Apache + PHP-FPM | Standard configuration | General hosting | |
| Nginx + PHP-FPM | High-performance | Static-heavy sites | |
| Nginx -> Varnish -> Apache | Maximum performance | High-traffic sites | |
| Apache + suPHP | Legacy compatibility | Legacy PHP apps | |
| LiteSpeed Enterprise | Commercial option | Enterprise hosting |
Service Detection
Detect which web servers are installed:
Port Mapping
| Port | Service | |
|---|---|---|
| 80 | HTTP (Apache or Nginx) | |
| 443 | HTTPS (Apache or Nginx) | |
| 82 | Varnish cache | |
| 8181 | Apache behind Nginx proxy | |
| 8080 | Tomcat (if enabled) |
Vhost Templates
Location: /usr/local/cwpsrv/htdocs/resources/conf/web_servers/
| Directory | Contents | |
|---|---|---|
vhosts/httpd/ | Apache templates (main, php-fpm, proxy) | |
vhosts/nginx/ | Nginx templates (main, php-fpm) | |
vhosts/varnish/ | Varnish templates (main only) |
Critical: Never edit templates directly -- they are overwritten on CWP updates. Create custom copies with different names.
Template Variables
Templates support these replacement variables:
%domain%-- Domain name%ip%-- Server IP address%user%-- Username%docroot%-- Document root path
Rebuilding Vhosts
Apache Configuration
Main Config Files
| File | Purpose | |
|---|---|---|
/usr/local/apache/conf/httpd.conf | Main Apache configuration | |
/usr/local/apache/conf.d/ | Module and site configs | |
/usr/local/apache/conf.d/ssl.conf | SSL configuration | |
/usr/local/apache/logs/ | Apache error/access logs | |
/usr/local/apache/domlogs/ | Per-domain access logs |
Apache Modules
| Module | Purpose | |
|---|---|---|
| mod_xsendfile | X-SENDFILE header processing | |
| mod_cloudflare | Real IP from Cloudflare | |
| mod_brotli | Brotli compression | |
| mod_pagespeed | Google page optimization | |
| mod_limits | DDoS protection | |
| mod_suexec | CGI scripts run as file owner | |
| mod_cgid | CGI script execution | |
| mod_userdir | Per-user web directories |
Common Apache Operations
SSL Configuration
For SSL certificate management, AutoSSL, and TLS hardening, see the cwp-security skill (references/ssl-tls.md).
Improve SSL grade by editing /usr/local/apache/conf.d/ssl.conf:
Nginx Configuration
Main Config Files
| File | Purpose | |
|---|---|---|
/etc/nginx/nginx.conf | Main Nginx configuration | |
/etc/nginx/conf.d/ | Additional configs | |
/etc/nginx/modules/ | Dynamic modules |
Common Nginx Operations
Nginx as Reverse Proxy
When using Nginx -> Apache stack, Nginx handles static files and proxies dynamic requests to Apache on port 8181.
Brotli Compression (Nginx)
For detailed Brotli compression setup and configuration, see the cwp-performance skill (references/compression.md).
Varnish Cache
Configuration
| File | Purpose | |
|---|---|---|
/etc/varnish/varnish.params | Varnish parameters | |
/etc/varnish/default.vcl | VCL configuration |
Common Varnish Operations
Varnish Port Configuration
Varnish port varies by CWP version (80 or 82). Detect the actual port:
Common Varnish ports:
- Port 82 -- Most common in newer CWP versions
- Port 80 -- Some older configurations
Configure in /etc/varnish/varnish.params:
Varnish Backend Configuration
Backend port also varies. Check actual configuration:
Common backend ports:
- 8181 -- Apache behind Nginx proxy (newer CWP)
- 8080 -- Apache behind Nginx proxy (older CWP)
Brotli Compression (Apache)
For detailed Apache Brotli setup, see the cwp-performance skill (references/compression.md).
Redirect and Proxy Headers
ERR_TOO_MANY_REDIRECTS Fix
When using Nginx -> Varnish -> Apache, add to .htaccess:
Cloudflare Real IP
Ensure mod_cloudflare is loaded to see real visitor IPs instead of Cloudflare IPs.
Troubleshooting
| Issue | Solution | ||
|---|---|---|---|
| ERR_TOO_MANY_REDIRECTS | Use X-Forwarded-Proto header in .htaccess | ||
| 502 Bad Gateway | Restart PHP-FPM, increase process limit | ||
| 503 Service Unavailable | Check port redirection, PHP-FPM socket | ||
| 504 Gateway Timeout | Restart Apache/PHP-FPM, increase limits | ||
| Apache proxy mutex | `ipcs -s \ | awk -v user=nobody '$3==user {system("ipcrm -s "$2)}'` | |
| Default page for all domains | Rebuild vHosts, check shared IP setting | ||
| Varnish fails on AlmaLinux 9 | Manual Varnish installation required |
Quick Diagnostic Commands
Additional Resources
references/apache.md-- Apache configuration and module detailsreferences/nginx.md-- Nginx configuration and reverse proxy setupreferences/varnish.md-- Varnish cache configuration and VCLreferences/litespeed.md-- LiteSpeed Enterprise setup
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/cwp-webserver/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/fattain-naime/cwp-superpowers/cwp-webserver)