首先感谢大佬分享 https://www.nodeloc.com/d/18760
看看配置 ,我估摸着用来 临时存储分享些文本内容,问题不大
</s><i> </i>美西9929线路 1C 256M 5G SSD 10M带宽 200G流量<i> </i><e>
**废话不多说,下面开整**
### 1、搭建Nginx + Php 环境
```
apk update
apk add nginx
apk add php php-fpm
```
### 2、修改php配置文件为如下内容
```ini
[PHP]
; 基础设置
engine = On
short_open_tag = Off
precision = 14
output_buffering = 4096
zlib.output_compression = Off
implicit_flush = Off
serialize_precision = -1
; 错误处理和日志记录
display_errors = Off
display_startup_errors = Off
log_errors = On
error_log = /var/log/php_errors.log
ignore_repeated_errors = Off
report_memleaks = On
track_errors = Off
; 文件上传
file_uploads = On
upload_max_filesize = 10M
max_file_uploads = 20
; 资源限制
max_execution_time = 30
max_input_time = 60
memory_limit = 96M
post_max_size = 10M
; 数据处理
default_mimetype = “text/html”
default_charset = “UTF-8”
always_populate_raw_post_data = -1
; 时区设置
date.timezone = “Asia/Shanghai”
; 会话设置
session.save_handler = files
session.save_path = “/var/lib/php/sessions”
session.use_strict_mode = 0
session.use_cookies = 1
session.cookie_secure = 0
session.use_only_cookies = 1
; 其他设置
cgi.fix_pathinfo = 1
upload_tmp_dir = /tmp
realpath_cache_size = 4096k
realpath_cache_ttl = 120
; 禁用危险函数
disable_functions = exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source
```
```ini
[www]
user = nginx
group = nginx
listen = /var/run/php82-fpm.sock
listen.owner = nginx
listen.group = nginx
listen.mode = 0660
pm = dynamic
pm.max_children = 50
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 35
pm.max_requests = 500
; Status page
pm.status_path = /status
ping.path = /ping
ping.response = pong
; Security settings
security.limit_extensions = .php .phar
; Set the PHP environment
env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/bin:/usr/bin:/bin
env[TMP] = /tmp
env[TEMP] = /tmp
env[TMPDIR] = /tmp
; PHP settings
php_admin_flag[log_errors] = on
php_admin_value[error_log] = /var/log/php82-fpm/error.log
php_admin_value[memory_limit] = 128M
php_admin_value[upload_max_filesize] = 50M
php_admin_value[post_max_size] = 50M
```
### 3、修改Nginx配置文件为如下内容,监听端口随便写,这里以 "52451" 为例
```
server {
listen 52451;
root /var/www/html;
index index.php index.html;
location / {
try_files $uri $uri/ =404;
add_header Content-Type "text/plain; charset=utf-8" always;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/var/run/php82-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
}
```
### 4、创建静态文件所需目录
```sh
mkdir -p /var/www/html/nl
chmod -R 777 /var/www/html
mkdir -p /var/run
```
### 5、将以下文件解压上传到目录 /var/www/html
### 6、启动php和nginx
```
rc-service nginx start
rc-service php-fpm82 start
```
### 7、在 LA 9929后台配置映射端口,在第3步我用的是 “52451”,在网络那里填 52451 ,然后点击更新

### 8、打开浏览器访问 >!http://23.224.216.90:52451/!<


### 9、密码修改,打开 upload.php 、file_manager.php 修改保存即可
`$correct_password = 'your_password_here'; // 设置你的密码`
:xhj28:**完活儿**,**都看到这儿了,不点个赞再走**?