apm 서버 설치하고 나서 계정 생성 하고 http://localhost/~계정/ 치면은 정상적으로 index.html 이 뜹니다.
제로보드 설치 하려고 xe 폴더 업로드 하고 http://localhost/~계정/xe/ 하면은 아래와 같이 애러 메시지가 뜨네요
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.7 (Ubuntu) Server at localhost Port 80
그냥 그냥 var/www/html/xe 에 업로드하고 http://localhost/xe/로 하면은 정상 실행이 되거든요… 어디서 설정 잘못한건지 고수님들 부탁드립니다.
제가 지금 직접 서버 운영을 하지 않기 때문에 실험을 해서 정확하게 알려 드릴 도리는 없구요. 더구나, XE는 몇년 전에 1.3.x 때 설치했다가 문제가 많아서 걷어냈기 때문에, 현재 버젼을 모릅니다. 그러나, 여러 정황으로 미루어보아 개별 사용자에게 php 사용이 허가되지 않았거나, mod_rewrite module이 허용되지 않은 것으로 추정됩니다. 다음을 점검해 보세요.
(1) 개별 사용자에 대한 php 사용 허가 :
다음의 file을 열어서 다음의 부분을 보세요.
/etc/apache2/mods-available/php5.conf
중간 쯤에 comment out 하라고 되어 있죠. 그 부분을 comment out하세요. 즉, 그 줄들의 맨 앞에 #을 하나씩 집어넣으세요. 그러고 나서 apache를 다시 시작하세요. (sudo /etc/init.d/apache2 restart)
이 방법은 다음의 글에서 참고한 것입니다. [url:u8isxgal]http://emphaticnonsense.com/2011/10/06/enabling-apache-php-execution-in-user-directories-on-ubuntu-lucid/[/url:u8isxgal]
[code:u8isxgal]
<IfModule mod_php5.c>
<FilesMatch ".ph(p3?|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch ".phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
# To re-enable php in user directories comment the following lines
# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
# prevents .htaccess files from disabling it.
<IfModule mod_userdir.c>
<Directory /home/*/public_html>
php_admin_value engine Off/etc/apache2/mods-available/php5.conf
</Directory>
</IfModule>
</IfModule>
[/code:u8isxgal]
(2) 위 조치를 했는데도 안되면, mod_rewrite module의 문제일 수도… 터미널을 열고 다음의 명령어 2개를 이용해서 mod_rewrite를 활성화하고 apache를 다시 시작하세요. 아래의 방법은 다음의 글에서 나온 방법입니다. [url:u8isxgal]http://stackoverflow.com/questions/869092/how-to-enable-mod-rewrite-for-apache-2-2[/url:u8isxgal]
[code:u8isxgal]
sudo a2enmod rewrite
sudo /etc/init.d/apache2 restart
[/code:u8isxgal]
(3) 그래도 안되면? 저는 잘 모르겠습니다. 위 2가지 조치를 취한 후, apache error log (/var/log/apache2/error.log)에서 error message들 중에서 새로 apache2가 시작된 시간 이후의 모든 부분을 첨부해서 다시 질문하세요. Internal server error는 매우 광범위한 원인으로 일어날 수 있기 때문에 흔하게 발생할 수 있는 경우가 아니면, error log 없이 추정하기 어렵다고 생각됩니다. error log를 주시면, 고수님들께서 나서시겠죠.
해결되시면, 다른 분들을 위하여 무었을 했더니 되더라, 혹은 위 2가지로 안되고, 다른 방법으로 해결했다 등의 한마디 남겨주시면 감사하겠습니다. 잘 해결되시길 바랍니다.
happyman 님 말씀하신대루 /etc/apache2/mods-available/php5.conf 에서
Running PHP scripts in user directories is disabled by default
To re-enable PHP in user directories comment the following lines
(from <IfModule …> to </IfModule>.) Do NOT set it to On as it
prevents .htaccess files from disabling it.
#<IfModule mod_userdir.c>
<Directory /home/*/public_html>
php_admin_flag engine Off
</Directory>
#</IfModule>
이부분의 주석처리 하고 나서 아파치 restart 시켜두 똑같은 현상이여서
sudo a2enmod rewrite
mod_rewrite를 활성화 시키니까 해결이 되네요.
happyman 님 감사합니다. 좋은 주말 보내세요.
모든 daemon은 log를 남기기 마련이고, 죽을 때에도 그냥 죽지는 않을 것 같고, 무언가 log에 흔적을 남겼을 듯 합니다만… log에서 "kill"이란 단어가 있나 한번 찾아보세요. 그럼 죽은 이유와 죽은 시간을 알려줄 듯합니다. 제 상식으로는 한동안 connect하지 않으면 죽는다는 것은 이상하게 들리구요. 죽은 시간이 일정하다면 뭔가 cron job과 관련이 있을 듯도 하구요. 아무튼 죽은 이유와 죽은 시간을 근거로 뭔가 추정할 수 있을 듯도 합니다. 본인이 추정해 보시고, 안되면 그 정보와 함께 다시 질문하시면, 고수님 들이 나서실지도 모르구요.