我有一个简单的docker-compose配置php-fpm和nginx,我看不到任何php文件.当我转到localhost时,它显示File Not Found.
我尝试了我能在网上找到的所有东西,但我尝试过的一切都失败了.它适用于html,但不适用于php文件.似乎是一个路径问题,或类似的东西.
我遇到这个错误docker-compose logs:
project3-php_1 | 172.17.0.5 - 29/Mar/2016:13:29:12 +0000 "GET /index.php" 404
project3-front_1 | 172.17.0.1 - - [29/Mar/2016:13:29:12 +0000] "GET / HTTP/1.1" 404 27 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36"
project3-front_1 | 2016/03/29 13:29:12 [error] 8#8: *3 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 172.17.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://172.17.0.2:9000", host: "localhost"
Run Code Online (Sandbox Code Playgroud)
这是我的docker-compose:
project3-front:
image: nginx
ports:
- "80:80"
links: …Run Code Online (Sandbox Code Playgroud)