Files
computer-network/web/index.html
T
2026-03-30 22:05:57 +08:00

168 lines
4.8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>简易Web服务器 - 欢迎</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
padding: 20px;
}
.container {
background: white;
border-radius: 20px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
max-width: 600px;
width: 100%;
padding: 50px;
text-align: center;
}
h1 {
color: #333;
font-size: 36px;
margin-bottom: 10px;
}
.subtitle {
color: #666;
font-size: 18px;
margin-bottom: 30px;
}
.info-box {
background: #f8f9fa;
border-radius: 10px;
padding: 20px;
margin: 20px 0;
text-align: left;
}
.info-box h2 {
color: #667eea;
font-size: 20px;
margin-bottom: 15px;
}
.info-box ul {
list-style: none;
padding-left: 0;
}
.info-box li {
padding: 8px 0;
color: #555;
border-bottom: 1px solid #e9ecef;
}
.info-box li:last-child {
border-bottom: none;
}
.info-box li strong {
color: #333;
}
.actions {
margin-top: 30px;
}
.btn {
display: inline-block;
padding: 12px 30px;
margin: 5px;
font-size: 16px;
font-weight: 600;
text-decoration: none;
border-radius: 8px;
transition: all 0.3s ease;
border: none;
cursor: pointer;
}
.btn-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}
.btn-secondary {
background: #f8f9fa;
color: #667eea;
border: 2px solid #667eea;
}
.btn-secondary:hover {
background: #667eea;
color: white;
transform: translateY(-2px);
}
.footer {
margin-top: 30px;
color: #999;
font-size: 14px;
}
</style>
</head>
<body>
<div class="container">
<h1>🎉 欢迎使用简易Web服务器</h1>
<p class="subtitle">一个简单高效的多线程Web服务器</p>
<div class="info-box">
<h2>✨ 特性</h2>
<ul>
<li><strong>多线程并发</strong>:使用goroutine处理并发请求</li>
<li><strong>GET方法支持</strong>:完美的HTTP GET请求处理</li>
<li><strong>自动MIME类型</strong>:智能识别文件类型</li>
<li><strong>自定义错误页</strong>:友好的404和501错误页面</li>
<li><strong>实时日志</strong>:控制台输出访问日志</li>
<li><strong>Web管理控制台</strong>:图形化界面管理服务器</li>
</ul>
</div>
<div class="info-box">
<h2>📊 服务器信息</h2>
<ul>
<li><strong>HTTP版本</strong>:HTTP/1.1</li>
<li><strong>支持的请求方法</strong>:GET(获取)</li>
<li><strong>响应状态码</strong>:
<ul style="margin-top: 5px; margin-left: 20px;">
<li>200 OK(成功)- 请求成功</li>
<li>404 Not Found(未找到)- 资源不存在</li>
<li>501 Not Implemented(未实现)- 不支持的请求方法</li>
</ul>
</li>
</ul>
</div>
<div class="actions">
<a href="/test.html" class="btn btn-primary">测试页面</a>
<a href="http://localhost:9001" target="_blank" class="btn btn-secondary">管理控制台</a>
</div>
<div class="footer">
<p>计算机网络课程设计 | 简单Web服务器</p>
</div>
</div>
</body>
</html>