- 2017.06.17
- 조회수 912
- 댓글수 4
https://github.com/xpressengine/xpressengine/blob/develop/example.xe3-nginx-rewrite.conf
링크에 있는 내용을 적용하였습니다.
location ~ /\. {
}
location ~ \.php$ {
}
location / {
}
이 항목들 때문에 적용시 '/'중복 오류가 생겨, location / { } 를 제거한 rewrite 항목만 적용해주었습니다.
적용후에는 404 Not Found가 표시가 되는데, 적용을 풀게되면 메인은 표시가 되나 다른 페이지 이동이 불가능합니다.
Nginx 에러 로그에 표시가 되지 않으니 어떻게 해결해야할지 방향을 잡을 수 없습니다.
아래 내용은 항목들 제거 없이 그대로 적용 했을시의 오류입니다.
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2017-06-17 22:21:58 KST; 3s ago
Process: 35181 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited,
Process: 35165 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 35186 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
Main PID: 35168 (code=exited, status=0/SUCCESS)
Jun 17 22:21:58 Shin systemd[1]: Starting A high performance web server and a reverse proxy server...
Jun 17 22:21:58 Shin nginx[35186]: nginx: [emerg] duplicate location "/" in /etc/nginx/write2.conf:12
Jun 17 22:21:58 Shin nginx[35186]: nginx: configuration file /etc/nginx/nginx.conf test failed
Jun 17 22:21:58 Shin systemd[1]: nginx.service: Control process exited, code=exited status=1
Jun 17 22:21:58 Shin systemd[1]: Failed to start A high performance web server and a reverse proxy server.
Jun 17 22:21:58 Shin systemd[1]: nginx.service: Unit entered failed state.
Jun 17 22:21:58 Shin systemd[1]: nginx.service: Failed with result 'exit-code'.
*PHP7.0
*Mysql
*Nginx 1.10.0 을 사용중입니다.
0개 댓글