리눅스 index.html는 뜨는데 index.php가 접속이 안됩니다.
index.html는 뜨는데 index.php페이지로 접속하면 아래처럼 나옵니다.
퍼미션 변경해봐도 마찬가지고, 이리저리 해보다가 index.html를 올려보니까 index.html은 멀쩡하게 뜹니다.
php 파일은 모두 아래처럼 나옵니다.
Forbidden
You don't have permission to access / on this server.
httpd.conf 파일인데 어떻게 수정해야 하나요?
#AddType application/x-gzip .tgz
#
# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
#
AddType application/x-httpd-php .php .php3 .inc .asp .html
# AddType application/x-httpd-php .php .htm .html
AddType application/x-httpd-php-source .phps
#
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
답변 2개 / 댓글 5개
혹시 ssl적용하셨나요?
그랬다면 포트넘버까지 url에 적용하지 않아 그런 에러메시지가 뜰 수도 있습니다.
답변에 대한 댓글 4개
웹호스팅의 경우 ssl신청하면 그곳에서 부여하는 포트넘버가 있습니다.
그걸 얘기하는 겁니다.
ssl적용하지 않으셨다면 이 문제는 아닌 듯 하구요...ㅎ
<Directory "/home/aaa">
Options FollowSymLinks
DirectoryIndex index.php index.html index.htm index.jsp *.jsp *.php
AllowOverride None
Order deny,allow
Allow from all
</Directory>
DirectoryIndex index.php index.html index.htm index.jsp *.jsp *.php
httpd.conf 파일 하단에 이부분을 추가하니 정상적으로 접속이 되는데 이렇게 사용해도 되는건가요?
잘되신다니 도움이 되어 드리지 못했지만 다행입니다 ㅎㅎ
지금 나오는 것은 퍼미션 에러인데요..
디렉토리 퍼미션을 변경 해야 해요.
아니면 방화벽
일단 php 코드 인식하려면 아래와 같이 하면 되요.
그런데 php 코드는 안해도 인식 될 텐데요.
AddType application/x-httpd-php .php .js .html .htm
답변에 대한 댓글 1개
답변을 작성하려면 로그인이 필요합니다.
80포트 말씀하시는건가요?