0
.conf 파일을 업데이트하고 싶지만 무엇을해도 업데이트되지 않습니까? 해결 방안은 무엇인가?Dockerfile을 통해 설정 파일을 업데이트하는 방법
dockerfile 이제이 간단하다 :
FROM nginx:latest
COPY ./default.conf /etc/nginx/conf.d/default.conf
그냥 루트 폴더 변경을 원하기 때문에이를 업데이트해야합니다.
server {
listen 80 default_server;
root /var/www/html/public;
index index.html index.php;
charset utf-8;
location/{
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
access_log off;
error_log /var/log/nginx/error.log error;
sendfile off;
client_max_body_size 100m;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
}
location ~ /\.ht {
deny all;
}
}
"내가하는 일은 무엇이든 업데이트되지 않습니다."- 정확히 무엇을하고 있습니까? – jwodder
도커 빌드 -t containerid. 내 인덱스 파일을 공용 폴더에서 시작하고 싶습니다. 그게 다야. –
사용자'USER root' 설정 시도 – VladoDemcak