← 문제 목록
중급 Linux 50P

location 블록 매칭 순서

/static/style.css 요청이 PHP-FPM으로 처리되어 오류가 발생합니다. 문제를 찾으세요.
NGINX
server {
    listen 80;
    root /var/www/html;

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

    location ~ /static {
        fastcgi_pass unix:/run/php/php-fpm.sock;
        include fastcgi.conf;
    }

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

답변

로그인 후 제출하기
0명 풀이 · 정답률 0%