了解环境
下载环境
git clone https://github.com/hellowzsg/docker-phper.git && cd docker-phper
启动
根据需求启动服务
docker-compose up -d php nginx mysql
添加站点
vi ./config/nginx/conf.d/fastadmin.conf
复制以下内容
server { listen 80; charset utf-8; server_name fastadmin.docker; root /var/www/html/fastadmin/public; location / { index index.html index.htm index.php; #autoindex on; if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=$1 last; break; } } location ~ .php$ { fastcgi_pass dp_php:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } access_log /var/log/nginx/nginx.fastadmin.access.log main; error_log /var/log/nginx/nginx.fastadmin.error.log error; #error_page 404 /404.html;}
上传fastadmin代码
下载FastAdmin完整包解压到./www目录下
重启nginx
docker-composer restart nginx
追加本地hosts
127.0.0.1 fastadmin.docker
访问fastadmin.docker
希望以上内容对你有所帮助!如果还有其他问题,请随时提问。 各类知识收集 拥有多年CMS企业建站经验,对 iCMS, Fastadmin, ClassCMS, LeCMS, PbootCMS, PHPCMS, 易优CMS, YzmCMS, 讯睿CMS, 极致CMS, Wordpress, HkCMS, YznCMS, WellCMS, ThinkCMF, 等各类cms的相互转化,程序开发,网站制作,bug修复,程序杀毒,插件定制都可以提供最佳解决方案。