127.0.0.1:6789에 액세스하면 제대로 작동하지만 127.0.0.1:6789/busca.html?q=a와 같은 항목에 액세스하려고하면 500 내부 서버 오류가 발생합니다.
이것은 내 nginx 구성 파일입니다.
server {
listen 88;
root /vagrant/rizqcursosonline/rizqcursosonline/frontend/wwwpublic;
index index.php index.html index.htm;
server_name example.com;
location / {
try_files $uri $uri/ /index.html;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /vagrant/rizqcursosonline/rizqcursosonline/frontend/wwwpublic/;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
nginx 로그 오류
2014/04/12 18:16:32 [error] 4165#0: *5 rewrite or internal redirection cycle while internally redirecting to "/index.html", client: 10.0.2.2, server: example.com, request: "GET /busca.html?q=a HTTP/1.1", host: "127.0.0.1:6789", referrer: "http://127.0.0.1:6789/"
2014/04/12 18:16:32 [오류] 4165 # 0 : * 7 내부적으로 "/index.html"로 리디렉션하는 동안 재 작성 또는 내부 리디렉션주기, 클라이언트 : 10.0.2.2, 서버 : example.com, 요청 : " GET /favicon.ico HTTP / 1.1 ", 호스트 :"127.0.0.1:6789 "
대신에
try_files $uri $uri/ /index.html;
나는 사용했다
try_files $uri/ $uri /index.php?$query_string;
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다