? 安装 nginx 软件包;
? 配置文件名为 ispweb.conf,放置在/etc/nginx/conf.d/目录下;
? 网站根目录为/mut/crypt(目录不存在需创建);
? 启用 FastCGI 功能,让 nginx 能够解析 php 请求;
? index.php 内容使用 Welcome to 2022 Computer Network Application contest!
apt install nginx php php-fpm -y
vim /etc/nginx/conf.d/ispweb.conf
server {
listen 80 ;
root /mut/crypt;
index index.php;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
}
}
vim /etc/nginx/nginx.conf
62:# include /etc/nginx/sites-enabled/*;
mkdir -p /mut/crypt
echo "Welcome to 2022 Computer Network Application contest!" > /mut/crypt/index.php
systemctl restart nginx
UOS系统除了题目要求,再添加一张NAT模式,国赛比赛环境也是联网安装服务