본문 바로가기

프로그래밍

[Apache]Internal Server Error

반응형

 

 

개발용 웹서버를 설정하는 도중 다음과 같은 에러가 나왔다.

 

 

 

 

 

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Apache/2.4.29 (Ubuntu) Server at 내정보

 

아파치쪽에서 난 에러이기 때문에 아파치 로그를 확인했다.

우분투 기준으로는 /var/log/apache2/ 경로에 error.log파일을 확인했다.

 

 

tail -f /var/log/apache2/error.log

 

 

 

[Wed Nov 30 13:17:51.270795 2022] 
[core:alert] [pid 29778] 
[client ㄹㄹㄹㄹㄹ] /var/www/html/ㄹㄹㄹㄹ/.htaccess: 
Invalid command 'RewriteEngine', perhaps misspelled or defined by a module 
not included in the server configuration, referer: ㄹㄹㄹㄹㄹ

 

apache2 옵션중에 RewriteEngine 옵션이 활성화 안되서 발생한 문제

옵션을 활성화하고 아파치를 재시작하면 된다.

 

 

sudo a2enmod rewrite && sudo service apache2 restart

 

 

출저

https://stackoverflow.com/questions/10144634/htaccess-invalid-command-rewriteengine-perhaps-misspelled-or-defined-by-a-m

 

.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

I have this error when trying to browse php files locally [Fri Apr 13 19:16:40 2012] [alert] [client 127.0.0.1] C:/AppServ/www/hr-website/.htaccess: Invalid command 'RewriteEngine', perhaps misspe...

stackoverflow.com

 

하지만 이거 해결하니까 다른에러가 떳..

반응형