Apache HTTP Server
Interactive terminal for learning Apache web server commands. Click buttons in the sidebar or type commands directly.
HTML
<terminal-window
id="terminal"
theme="dark"
prompt="root@server:~# "
cursor-style="block"
cursor-blink="true"
welcome="Apache HTTP Server Tutorial - Type 'help' for available commands."
></terminal-window>
JavaScript
import { registerApacheCommands } from './commands/apache-commands.js';
const terminal = document.getElementById('terminal');
// Register all Apache commands
registerApacheCommands(terminal);
// Helper to run commands from buttons
function run(cmd) {
terminal.executeCommand(cmd);
}
Custom Command Example
// Register a custom command handler
terminal.registerCommand('sudo', (args) => {
if (args[0] === 'systemctl' && args[2] === 'apache2') {
const action = args[1];
switch (action) {
case 'start':
return ''; // Apache started
case 'status':
return `● apache2.service - The Apache HTTP Server
Active: active (running)`;
// ... more actions
}
}
});