Status is an open-source status page system that helps you communicate the status of your services to your users. It provides a clean, professional interface for displaying service availability and incident history.
| File/Directory | Path | Purpose |
|---|---|---|
| Main config | /var/www/html/status/config.php |
Main configuration |
| Database | MySQL/SQLite | Database storage |
| Web files | /var/www/html/status/ |
Application files |
| Templates | /var/www/html/status/templates/ |
Email templates |
| Language files | /var/www/html/status/lang/ |
Translations |
| Web config | /etc/nginx/sites-available/status |
Nginx configuration |
| Cron jobs | /etc/cron.d/status |
Scheduled tasks |
<?php
// /var/www/html/status/config.php
return [
// Application settings
'app' => [
'name' => 'Service Status',
'url' => 'https://status.example.com',
'timezone' => 'UTC',
'language' => 'en',
'version' => '2.0.0',
],
// Database settings
'database' => [
'driver' => 'mysql', // mysql or sqlite
'host' => 'localhost',
'port' => 3306,
'database' => 'status',
'username' => 'status',
'password' => 'SecureDbPassword123!',
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => 'status_',
],
// SQLite settings
'sqlite' => [
'path' => '/var/www/html/status/data/database.db',
],
// Security settings
'security' => [
'app_key' => 'YourSecretAppKeyHere32Characters!',
'hash_driver' => 'bcrypt',
'hash_bcrypt_rounds' => 10,
],
// Session settings
'session' => [
'driver' => 'file', // file, database, redis
'lifetime' => 120,
'expire_on_close' => false,
'encrypt' => false,
'files' => '/var/www/html/status/storage/framework/sessions',
'connection' => null,
'table' => 'sessions',
'store' => null,
'lottery' => [2, 100],
'cookie' => 'status_session',
'path' => '/',
'domain' => null,
'secure' => true,
'http_only' => true,
'same_site' => 'lax',
],
// Cache settings
'cache' => [
'driver' => 'file', // file, database, redis, memcached
'prefix' => 'status_',
'path' => '/var/www/html/status/storage/framework/cache/data',
'connection' => null,
'table' => 'cache',
],
// Redis settings
'redis' => [
'client' => 'predis',
'default' => [
'host' => '127.0.0.1',
'port' => 6379,
'database' => 0,
'password' => null,
],
],
// Mail settings
'mail' => [
'driver' => 'smtp',
'host' => 'smtp.example.com',
'port' => 587,
'from' => [
'address' => 'status@example.com',
'name' => 'Service Status',
],
'encryption' => 'tls',
'username' => 'status@example.com',
'password' => 'EmailPassword123!',
'sendmail' => '/usr/sbin/sendmail -bs',
'markdown' => [
'theme' => 'default',
'paths' => [
'/var/www/html/status/resources/views/vendor/mail',
],
],
],
// Status page settings
'status_page' => [
// Page title
'title' => 'Service Status',
// Page subtitle
'subtitle' => 'Current system status and updates',
// Page description
'description' => 'Real-time status updates for our services',
// Show/hide elements
'show_uptime' => true,
'show_incident_history' => true,
'show_scheduled_maintenance' => true,
'show_subscribers' => true,
// Default view
'default_view' => 'public', // public, private
// Services per page
'services_per_page' => 10,
// Incidents per page
'incidents_per_page' => 20,
],
// Service configuration
'services' => [
// Service groups
'groups' => [
[
'name' => 'Core Services',
'order' => 1,
'services' => ['api', 'website', 'database'],
],
[
'name' => 'Additional Services',
'order' => 2,
'services' => ['cdn', 'email', 'search'],
],
],
// Service definitions
'definitions' => [
'api' => [
'name' => 'API',
'description' => 'REST API services',
'order' => 1,
'check_url' => 'https://api.example.com/health',
'check_interval' => 60,
'check_timeout' => 10,
'check_method' => 'GET',
'expected_status' => 200,
'expected_content' => '{"status":"ok"}',
],
'website' => [
'name' => 'Website',
'description' => 'Main website',
'order' => 2,
'check_url' => 'https://www.example.com',
'check_interval' => 60,
'check_timeout' => 10,
'check_method' => 'GET',
'expected_status' => 200,
],
'database' => [
'name' => 'Database',
'description' => 'Database services',
'order' => 3,
'check_type' => 'manual', // manual, automatic
],
],
],
// Incident settings
'incidents' => [
// Default incident status
'default_status' => 'investigating', // investigating, identified, monitoring, resolved
// Status options
'statuses' => [
'investigating' => 'Investigating',
'identified' => 'Identified',
'monitoring' => 'Monitoring',
'resolved' => 'Resolved',
],
// Impact levels
'impacts' => [
'none' => 'No Impact',
'minor' => 'Minor Degradation',
'major' => 'Major Outage',
'critical' => 'Critical Outage',
],
// Auto-close resolved incidents (hours)
'auto_close_hours' => 24,
],
// Subscriber settings
'subscribers' => [
// Enable subscriptions
'enabled' => true,
// Require email verification
'verify_email' => true,
// Verification token expiry (hours)
'verify_expiry' => 24,
// Notification preferences
'notification_types' => [
'incident_create' => true,
'incident_update' => true,
'incident_resolve' => true,
'maintenance_scheduled' => true,
'maintenance_started' => true,
'maintenance_completed' => true,
],
],
// API settings
'api' => [
// Enable API
'enabled' => true,
// API version
'version' => 'v1',
// API endpoint prefix
'prefix' => '/api',
// API authentication
'auth' => [
'enabled' => true,
'type' => 'token', // token, basic, oauth
],
// Rate limiting
'rate_limit' => [
'enabled' => true,
'requests' => 100,
'decay' => 60, // seconds
],
],
// Webhook settings
'webhooks' => [
// Enable webhooks
'enabled' => true,
// Webhook timeout (seconds)
'timeout' => 10,
// Retry settings
'retry' => [
'enabled' => true,
'max_attempts' => 3,
'delay' => 60, // seconds
],
],
// Logging settings
'logging' => [
'default' => 'stack',
'channels' => [
'stack' => [
'driver' => 'stack',
'channels' => ['daily'],
'ignore_exceptions' => false,
],
'daily' => [
'driver' => 'daily',
'path' => '/var/www/html/status/storage/logs/status.log',
'level' => 'debug',
'days' => 14,
],
'single' => [
'driver' => 'single',
'path' => '/var/www/html/status/storage/logs/status.log',
'level' => 'debug',
],
],
],
// Localization settings
'localization' => [
'locale' => 'en',
'fallback_locale' => 'en',
'locales' => ['en', 'de', 'fr', 'es', 'it', 'pt', 'ru', 'zh', 'ja'],
],
// Maintenance settings
'maintenance' => [
// Enable maintenance mode
'enabled' => false,
// Maintenance message
'message' => 'System is under maintenance. Please check back later.',
// Allowed IPs (bypass maintenance)
'allowed_ips' => ['127.0.0.1', '::1'],
],
// Theme settings
'theme' => [
// Default theme
'default' => 'default',
// Available themes
'available' => ['default', 'dark', 'light', 'custom'],
// Custom CSS
'custom_css' => '',
// Custom JavaScript
'custom_js' => '',
// Logo
'logo' => [
'enabled' => false,
'url' => '/assets/logo.png',
'height' => 40,
],
// Favicon
'favicon' => '/favicon.ico',
// Footer text
'footer' => '© ' . date('Y') . ' Company Name. All rights reserved.',
],
// Metrics settings
'metrics' => [
// Enable metrics display
'enabled' => true,
// Metrics provider (internal, cachet, custom)
'provider' => 'internal',
// Display settings
'display' => [
'show_graphs' => true,
'show averages' => true,
'default_range' => 30, // days
'available_ranges' => [7, 14, 30, 60, 90],
],
],
];
# /etc/nginx/sites-available/status
server {
listen 80;
server_name status.example.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
server_name status.example.com;
# SSL configuration
ssl_certificate /etc/letsencrypt/live/status.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/status.example.com/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
# Security headers
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
# Root directory
root /var/www/html/status/public;
index index.php;
# Logging
access_log /var/log/nginx/status.access.log;
error_log /var/log/nginx/status.error.log;
# PHP processing
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/var/run/php/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
# Timeouts
fastcgi_connect_timeout 60s;
fastcgi_send_timeout 60s;
fastcgi_read_timeout 60s;
}
# Deny access to sensitive files
location ~ /\. {
deny all;
}
location ~* /(config\.php|\.git|\.env) {
deny all;
}
}
<?php
// Service monitoring configuration
return [
'monitoring' => [
// Check interval (seconds)
'interval' => 60,
// Timeout (seconds)
'timeout' => 10,
// Retry settings
'retry_count' => 3,
'retry_delay' => 10,
// Status determination
'status_rules' => [
'operational' => ['response_time' => '<1000', 'success_rate' => '>99'],
'degraded' => ['response_time' => '<5000', 'success_rate' => '>90'],
'outage' => ['response_time' => '>5000', 'success_rate' => '<90'],
],
],
];
<?php
// Notification configuration
return [
'notifications' => [
// Email notifications
'email' => [
'enabled' => true,
'templates' => [
'incident_create' => 'emails.incident_create',
'incident_update' => 'emails.incident_update',
'incident_resolve' => 'emails.incident_resolve',
],
],
// Slack notifications
'slack' => [
'enabled' => false,
'webhook_url' => 'https://hooks.slack.com/services/XXX/YYY/ZZZ',
'channel' => '#status',
],
// Webhook notifications
'webhook' => [
'enabled' => false,
'url' => 'https://api.example.com/status-webhook',
'method' => 'POST',
],
],
];
# Check PHP syntax
php -l /var/www/html/status/config.php
# Test database connection
php /var/www/html/status/artisan db:test
# Run health check
php /var/www/html/status/artisan health:check
# Run migrations
php /var/www/html/status/artisan migrate
# Seed database
php /var/www/html/status/artisan db:seed
# Clear cache
php /var/www/html/status/artisan cache:clear
php /var/www/html/status/artisan config:clear
php /var/www/html/status/artisan route:clear
# Restart PHP-FPM
sudo systemctl restart php-fpm
# Restart Nginx
sudo systemctl restart nginx
# View logs
sudo tail -f /var/www/html/status/storage/logs/status.log
# Access web interface
curl http://localhost/status
# Check API
curl http://localhost/status/api/status
# Check health endpoint
curl http://localhost/status/api/health
# Run manual service check
php /var/www/html/status/artisan services:check
# List services
php /var/www/html/status/artisan services:list
# Check service status
php /var/www/html/status/artisan services:status
Running Status Page in regulated environments? We assist with:
Secure your deployment: office@linux-server-admin.com | Contact Page