Skip to content

Latest commit

 

History

History
64 lines (41 loc) · 1 KB

README.md

File metadata and controls

64 lines (41 loc) · 1 KB

环境

  • Ubuntu 2204
  • PHP 8.1
  • Nginx 1.18.0

部署过程

部署web环境

部署PHP

apt -y install php-fpm php-mysql php-json php-gd php-xml php-mbstring php-zip php-curl

部署nginx

apt -y install nginx

克隆项目到本地

git clone https://gitee.com/zw135113/ip_lookup.git

ngixn配置文件示例

/etc/nginx/sites-enabled/ip_lookup.conf

server {
    listen 80;
    server_name 10.0.0.200;

    root /apps/ip_lookup;
    index index.php index.html index.htm;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php8.1-fpm.sock;
    }

}

加载配置文件

nginx -s reload

效果展示

示例图片