An Apache httpd static website ready to deploy on Convox.
This example demonstrates how to deploy a static website using Apache httpd on Convox. Perfect for static sites, documentation, single-page applications, or any content that needs a reliable web server with professional features.
Deploy to Convox Cloud for a fully-managed platform experience, or to your own Convox Rack for complete control over your infrastructure. Either way, you'll get automatic SSL, load balancing, and zero-downtime deployments out of the box.
-
Create a Cloud Machine at console.convox.com
-
Create the app:
convox cloud apps create httpd -i your-machine-name- Deploy the app:
convox cloud deploy -a httpd -i your-machine-name- View your app:
convox cloud services -a httpd -i your-machine-nameVisit your URL to see the example website!
- Create the app:
convox apps create httpd- Deploy the app:
convox deploy -a httpd- View your app:
convox services -a httpdVisit your URL to see the example website!
.
├── Dockerfile # Alpine-based Apache image
├── convox.yml # Convox deployment configuration
└── public-html/ # Your website files
├── index.html # Homepage
├── about.html # About page
├── style.css # Styling
└── info.php # Server info (static demo)
Simply add your HTML, CSS, JavaScript, and other static files to the public-html/ directory:
cp -r your-website/* public-html/
convox cloud deploy -a httpd -i your-machine-nameTo customize Apache configuration, you can either:
- Mount a custom config file in your Dockerfile
- Modify the default config with RUN commands
- Use .htaccess files in your public-html directory
For React, Vue, or Angular apps, add this to public-html/.htaccess:
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]convox cloud scale web --count 3 --cpu 500 --memory 512 -a httpd -i your-machine-nameconvox scale web --count 3 --cpu 500 --memory 512 -a httpd- Static Websites: Marketing sites, landing pages, blogs
- Documentation: Software documentation, API docs
- Single Page Applications: React, Vue, Angular builds
- File Hosting: Downloads, media files, assets
- Maintenance Pages: Temporary holding pages
- Alpine Linux: Minimal footprint for efficient containers
- Health Checks: Simple
/endpoint monitoring - Static Serving: Optimized for serving static files
- Production Ready: Based on official httpd Docker image
Cloud:
convox cloud logs -a httpd -i your-machine-nameRack:
convox logs -a httpdCloud:
convox cloud run web sh -a httpd -i your-machine-nameRack:
convox run web sh -a httpdCloud:
convox cloud run web "httpd -t" -a httpd -i your-machine-nameRack:
convox run web "httpd -t" -a httpdTo add PHP support, modify the Dockerfile:
FROM php:8-apache
# ... rest of configurationThen enable PHP processing in your Apache configuration.
- Keep static assets in subdirectories (css/, js/, images/)
- Use Apache's mod_rewrite for clean URLs
- Enable browser caching for better performance
- Monitor logs for 404s and errors
- Use health checks for reliability