# 🚩弃坑，别在 Lunes.Host 上搭建站点了

**URL:** <https://www.nodeloc.com/t/topic/56911>\
**Category:** 建站\
**Created:** [2025 年8 月 25 日 02:03 UTC](https://www.nodeloc.com/t/topic/56911 "2025-08-25T02:03:26Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

作者： ![srv](https://www.nodeloc.com/letter_avatar_proxy/v4/letter/s/ecccb3/32.png) [@srv](https://www.nodeloc.com/u/srv)\
发布日期： [2025 年8 月 25 日 02:03 UTC](https://www.nodeloc.com/t/topic/56911/1 "2025-08-25T02:03:26Z")

</div>

![image](https://www.nodeloc.com/uploads/default/original/2X/6/6c3de4000235f498f2a87e5749030fbb2819d488.png)

# 🚩🚩大家还是弃坑算了，昨天只是搭建一个站点就被封了，搞笑！！！

## 以下内容，只作参考了！

* * *

昨天在论坛里看到有人分享 Lunes.Host 提供免费服务器资源，今天一早就试着体验了一下，成功搭建了一个 PHP 站点。以下是完整的搭建过程记录，希望能帮助到有同样需求的伙伴。

## 搭建步骤

### 1. 创建服务器实例

首先访问 Lunes.Host 官网创建免费服务器：

- 在 Software 选项中选择 **Proot**
- 在网页控制台选择 【4】Alpine 系统
- 版本同样选择 【4】Alpine 版本3

### 2. 安装必要软件

通过网页控制台连接到服务器后，执行以下命令更新系统并安装所需软件：

```bash
apk update
apk add curl bash unzip htop php83 php83-fpm nginx

```

这里我们选择了 PHP 8.3 版本，这是 Alpine 仓库中较新的 PHP 版本。

### 3. 配置 PHP-FPM

编辑 PHP-FPM 配置文件 `/etc/php83/php-fpm.d/www.conf`，主要修改监听方式：

```ini
listen = /var/php-fpm83.sock

```

### 4. 配置 Nginx

编辑 Nginx 配置文件 `/etc/nginx/http.d/default.conf`，替换为以下内容：

```nginx
server {
    listen 3184 default_server;
    listen [::]:3184 default_server;

    root /www;
    
    # 添加索引文件设置
    index index.php index.html index.htm;

    location / {
        try_files $uri $uri/ =404;
    }

    location ~ \.php$ {
        fastcgi_pass unix:/var/php-fpm83.sock;
        fastcgi_index index.php;
        
        # 确保这些关键参数存在
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param QUERY_STRING $query_string;
        fastcgi_param REQUEST_METHOD $request_method;
        fastcgi_param CONTENT_TYPE $content_type;
        fastcgi_param CONTENT_LENGTH $content_length;
        
        include fastcgi_params;
    }

    # 防止 404 递归
    location = /404.html {
        internal;
    }
}

```

注意我们将默认端口从 80 改为了 3184（我服务器分配到的端口，你的要改成自己的），因为 Lunes.Host 的免费服务器只提供一个随机分配的端口。

### 5. 创建网站目录和测试文件

```bash
mkdir /www
echo '<?php phpinfo(); ?>' > /www/info.php

```

### 6. 启动服务

```bash
nginx
php-fpm83

```

## 访问测试

完成以上步骤后，访问 Lunes.Host 提供的服务器地址（如我的地址：[http://node67.lunes.host:3184/info.php](http://node67.lunes.host:3184/info.php)  
即可看到 PHP 信息页面正常显示。

## 总结

Lunes.Host 提供了一个简单易用的免费服务器环境，虽然资源有限制，但可用来学习和测试，毕竟上面可以安装软件，不像现在很多免费空间都是预置好的服务，没有一点儿可玩性。

---

<div class="post-metadata">

作者： ![LOsEE](https://www.nodeloc.com/user_avatar/www.nodeloc.com/losee/32/18514_2.png) [@LOsEE](https://www.nodeloc.com/u/LOsEE)\
发布日期： [2025 年8 月 25 日 02:07 UTC](https://www.nodeloc.com/t/topic/56911/2 "2025-08-25T02:07:48Z")

</div>

感谢分享

---

<div class="post-metadata">

作者： ![aion](https://www.nodeloc.com/user_avatar/www.nodeloc.com/aion/32/10265_2.png) [@aion](https://www.nodeloc.com/u/aion)\
发布日期： [2025 年8 月 25 日 02:15 UTC](https://www.nodeloc.com/t/topic/56911/3 "2025-08-25T02:15:35Z")

</div>

感谢分享

---

<div class="post-metadata">

作者： ![thinkend](https://www.nodeloc.com/letter_avatar_proxy/v4/letter/t/da6949/32.png) [@thinkend](https://www.nodeloc.com/u/thinkend)\
发布日期： [2025 年8 月 25 日 03:41 UTC](https://www.nodeloc.com/t/topic/56911/4 "2025-08-25T03:41:31Z")

</div>

感谢分享

---

<div class="post-metadata">

作者： ![checksky7](https://www.nodeloc.com/user_avatar/www.nodeloc.com/checksky7/32/6151_2.png) [@checksky7](https://www.nodeloc.com/u/checksky7)\
发布日期： [2025 年8 月 25 日 06:08 UTC](https://www.nodeloc.com/t/topic/56911/5 "2025-08-25T06:08:01Z")

</div>

[http://node1.lunes.host:2031](http://node1.lunes.host:2031)

---

<div class="post-metadata">

作者： ![DeeDee](https://www.nodeloc.com/user_avatar/www.nodeloc.com/deedee/32/72_2.png) [@DeeDee](https://www.nodeloc.com/u/DeeDee)\
发布日期： [2025 年8 月 25 日 06:24 UTC](https://www.nodeloc.com/t/topic/56911/6 "2025-08-25T06:24:24Z")

</div>

一段时间以后，会关机吗

---

<div class="post-metadata">

作者： ![10\_0\_16\_12](https://www.nodeloc.com/user_avatar/www.nodeloc.com/10_0_16_12/32/1014_2.png) [@10\_0\_16\_12](https://www.nodeloc.com/u/10_0_16_12)\
发布日期： [2025 年8 月 25 日 06:47 UTC](https://www.nodeloc.com/t/topic/56911/7 "2025-08-25T06:47:23Z")

</div>

Nginx就行了吧。。。

---

<div class="post-metadata">

作者： ![CoolMan](https://www.nodeloc.com/user_avatar/www.nodeloc.com/coolman/32/1938_2.png) [@CoolMan](https://www.nodeloc.com/u/CoolMan)\
发布日期： [2025 年8 月 25 日 06:47 UTC](https://www.nodeloc.com/t/topic/56911/8 "2025-08-25T06:47:49Z")

</div>

0.15cpu，放过他吧

---

<div class="post-metadata">

作者： ![0x996](https://www.nodeloc.com/letter_avatar_proxy/v4/letter/0/db5fbb/32.png) [@0x996](https://www.nodeloc.com/u/0x996)\
发布日期： [2025 年8 月 25 日 06:49 UTC](https://www.nodeloc.com/t/topic/56911/9 "2025-08-25T06:49:42Z")

</div>

感谢分享，很细。

---

<div class="post-metadata">

作者： ![hakd](https://www.nodeloc.com/user_avatar/www.nodeloc.com/hakd/32/561_2.png) [@hakd](https://www.nodeloc.com/u/hakd)\
发布日期： [2025 年8 月 25 日 07:17 UTC](https://www.nodeloc.com/t/topic/56911/10 "2025-08-25T07:17:21Z")

</div>

技术高手呀

---

<div class="post-metadata">

作者： ![hakd](https://www.nodeloc.com/user_avatar/www.nodeloc.com/hakd/32/561_2.png) [@hakd](https://www.nodeloc.com/u/hakd)\
发布日期： [2025 年8 月 25 日 07:21 UTC](https://www.nodeloc.com/t/topic/56911/11 "2025-08-25T07:21:39Z")

</div>

这机器对外虽只提供了一个端口，但配合nginx这种软件可以玩出很多个站的。  
另外，如果你还对内网穿透、CF隧道有研究，还可以玩出更多的花样。

---

<div class="post-metadata">

作者： ![jingzhang](https://www.nodeloc.com/user_avatar/www.nodeloc.com/jingzhang/32/951_2.png) [@jingzhang](https://www.nodeloc.com/u/jingzhang)\
发布日期： [2025 年8 月 25 日 08:58 UTC](https://www.nodeloc.com/t/topic/56911/12 "2025-08-25T08:58:39Z")

</div>

厉害厉害，这么小的机器都能搞站

---

<div class="post-metadata">

作者： ![GradyShah](https://www.nodeloc.com/user_avatar/www.nodeloc.com/gradyshah/32/16595_2.png) [@GradyShah](https://www.nodeloc.com/u/GradyShah)\
发布日期： [2025 年8 月 25 日 09:01 UTC](https://www.nodeloc.com/t/topic/56911/13 "2025-08-25T09:01:20Z")

</div>

感谢折腾分享

---

<div class="post-metadata">

作者： ![Zachariah](https://www.nodeloc.com/user_avatar/www.nodeloc.com/zachariah/32/13371_2.png) [@Zachariah](https://www.nodeloc.com/u/Zachariah)\
发布日期： [2025 年8 月 25 日 09:40 UTC](https://www.nodeloc.com/t/topic/56911/14 "2025-08-25T09:40:39Z")

</div>

感谢分享

---

<div class="post-metadata">

作者： ![kof97zip](https://www.nodeloc.com/letter_avatar_proxy/v4/letter/k/d6d6ee/32.png) [@kof97zip](https://www.nodeloc.com/u/kof97zip)\
发布日期： [2025 年8 月 25 日 14:36 UTC](https://www.nodeloc.com/t/topic/56911/15 "2025-08-25T14:36:58Z")

</div>

多次一举啊，不是直接就可以开nginx吗？

---

<div class="post-metadata">

作者： ![tufei](https://www.nodeloc.com/user_avatar/www.nodeloc.com/tufei/32/16779_2.png) [@tufei](https://www.nodeloc.com/u/tufei)\
发布日期： [2025 年8 月 26 日 01:04 UTC](https://www.nodeloc.com/t/topic/56911/16 "2025-08-26T01:04:12Z")

</div>

感谢楼主技术分享

---

<div class="post-metadata">

作者： ![tzamc](https://www.nodeloc.com/user_avatar/www.nodeloc.com/tzamc/32/5853_2.png) [@tzamc](https://www.nodeloc.com/u/tzamc)\
发布日期： [2025 年8 月 26 日 03:20 UTC](https://www.nodeloc.com/t/topic/56911/17 "2025-08-26T03:20:36Z")

</div>

我搭了vless节点也被封了。估计是不允许，但没看到tos。

---

<div class="post-metadata">

作者： ![qexing](https://www.nodeloc.com/user_avatar/www.nodeloc.com/qexing/32/12022_2.png) [@qexing](https://www.nodeloc.com/u/qexing)\
发布日期： [2025 年8 月 26 日 03:49 UTC](https://www.nodeloc.com/t/topic/56911/18 "2025-08-26T03:49:41Z")

</div>

TOS 页面明确写了不允许代理：

> **[Terms of Service | Lunes Host](https://lunes.host/tos/)**
>
> Read the Lunes Host Terms of Service: usage rules, payments, account suspension, refunds, and legal terms.

CPU 占用稍微高一点，也会被封，可玩性是很一般的

---

<div class="post-metadata">

作者： ![srv](https://www.nodeloc.com/letter_avatar_proxy/v4/letter/s/ecccb3/32.png) [@srv](https://www.nodeloc.com/u/srv)\
发布日期： [2025 年8 月 26 日 03:54 UTC](https://www.nodeloc.com/t/topic/56911/19 "2025-08-26T03:54:29Z")

</div>

> [@qexing](#):
>
> 占用稍微高一点

那可能是这个

---

<div class="post-metadata">

作者： ![hakd](https://www.nodeloc.com/user_avatar/www.nodeloc.com/hakd/32/561_2.png) [@hakd](https://www.nodeloc.com/u/hakd)\
发布日期： [2025 年8 月 26 日 03:54 UTC](https://www.nodeloc.com/t/topic/56911/20 "2025-08-26T03:54:46Z")

</div>

我昨天也搞了几个网站来着，用nodejs弄了个网站，再加两个静态网站。可能是cpu占用一直在15%左右吧，昨天给我关机了。  
没有搞节点啥的，纯网站。

[下一页](https://www.nodeloc.com/t/topic/56911.md?page=2)
