2016-09-08 3 views
1

abcd 디렉토리 (url : example.com/abcd)에 파일 (Codeigniter Framework)을 업로드했습니다. 내부의 모든 링크는 404 오류를줍니다.nginx - 모든 URL에 대해 codeigniter 404 오류가 발생했습니다.

server { 
    server_name example.com/abcd; 
    root /..../abcd; 

    index index.html index.php index.htm; 

    # set expiration of assets to MAX for caching 
    location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ { 
     expires max; 
     log_not_found off; 
    } 

    location/{ 
     # Check if a file exists, or route it to index.php. 
     try_files $uri $uri/ /index.php; 
    } 

    location ~* \.php$ { 
     fastcgi_pass example.com/abcd; 
     fastcgi_index index.php; 
     fastcgi_split_path_info ^(.+\.php)(.*)$; 
     include fastcgi_params; 
     fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
    } 

} 

에서 : 가 여기에 nginx.conf 파일에 대한 코드입니다 : index.php를 제거, 나는 (/.../abcd/ 서버에) 내 루트 디렉토리에이 nginx.conf 파일을 배치했다 아파치, 재작 성을 사용하여 쉽게, 나는 지금 nginx와 붙어있다. 도와주세요, 나는 코드 아래

+0

에서 가져온 처음으로 nginx를 사용하고 있습니다. 'server_name'이 무효하고 아마도'fastcgi_pass' 문 –

+0

@RichardSmith 그러면 server_name의 올바른 형식은 무엇입니까? –

+0

[이 문서] (http://nginx.org/en/docs/http/server_names.html)을 읽으십시오. 그러나 당신은'서버 이름'과'위치'가 함께 으깬 것처럼 보입니다. –

답변

관련 문제