2013-08-12 7 views
0

예쁜 URL을 처리하도록 구성된 일부 정적 HTML 웹 사이트를 개발하기 위해 Pelican을 사용하고 있지만 개발 서버는 파일 확장자가없는 페이지를 제공하지 않습니다.펠리칸 개발 서버에서 확장명없이 파일을 제공하려면 어떻게해야합니까?

/output/index.html -> should be accesible sith http://localhost:8000 (works) 
/output/contact.html -> should be accesible sith http://localhost:8000/contact (doesn't work) 
/output/products/index.html -> should be accesible sith http://localhost:8000/products (doesn't work) 

생산시 nginx가 적절히 구성되어있어 예쁜 URL이있는 문서를 제공합니다.

문제는 devenv 서버에서 동일한 작업을 수행하는 방법입니까?

답변

2

"devserver"는 단지 python -m SimpleHTTPServer의 래퍼이며, 이름에서 알 수 있듯이 Nginx의 모든 재 작성 기능이없는 매우 간단한 웹 서버입니다. 잠재적 인 솔루션은 다음과 같습니다 /output/products/index.html 패턴과 http://localhost:8000/products/ (안 http://localhost:8000/products 그러나)에서 로컬 액세스를 통해

  1. 출력 모든 파일을

  2. 하여 설치하고 서버 측에 맞게 로컬의 nginx를 구성 구성

+0

https://github.com/getpelican/pelican/pull/1040 내가이 누락 된 기능을 구현하는 패치를 만든 풀 요청입니다 – sorin

0

이것은 누락되었지만 최소한의 노력으로 SimpleHTTPServer에이 기능을 추가 할 수있었습니다. 여기

는 https://github.com/getpelican/pelican/pull/1040

관련 문제