웹서버 아파치가동후.... index.html ? index.php ?

yjh의 이미지

왕초보 또 질문 올리네여.. 지송... ㅜ.ㅜ

"레드햇9.0고수따라하기" 라는 교재를 사서 공부하던중..

궁금한 사항이 있어 질문 올립니다.

아파치서버 가동한후..

index.html 을 작성하여 저장하고
localhost.localdomain 에 접속하여 확인완료 하였습니다.

다음은..
index.php 를 작성하여 저장하고
localhost.localdomain 에 접속하여 확인완료 하였습니다.
(교재에 나온대로 php설정 화면이 나오더군여)

근데..여기서 제가 궁금한건

같은 주소(localhost.localdomain)에 접속을 햇는데

어떻게 처음엔 index.html 화면이 나오고
두번째는 index.php 화면이 나오는가 ? 입니다.

httpd.conf 에 들어가 서버 설정내용을 확인해보니

DirectoryIndex index.html index.html.var

이렇게 되어있는 내용을 확인했습니다.

아마도 호스트도메인에 접속요청이 들어오면 index.html 을
보여주라는 내용 같은데..
여기에 index.php는 없는데 어케 알고 화면에 보여주었을까요? ㅡㅡ;

초보라 잘 이해가 가지 않습니다.

선배님들의 황금같은 조언 부탁드립니다.

오늘도 좋은 하루 되세여..
:roll:

익명 사용자의 이미지

흠.. PHP설치할때 아파치를 조작(?)해서 한게 아닐까요?

함기훈의 이미지

정말 이상하네요.
DirectoryIndex index.html index.html.var
부분을
DirectoryIndex index.htm
으로만 해놓고 한번 index.html로 접속해보세요.

만약 이걸로 접속이 된다면...
다른 디렉토리에 있는 httpd.conf 파일을 쓰는게 아닐까 합니다. =_=

index.php는 기술해주어야만 작동되는걸로 아는데 정말 이상하네요

간다.

멈출까 나아갈까
망설이고 있을 때에는
나아가라고 배웠다.

shyxu의 이미지

그럴땐..
설정이 꼬인겁니다.

다시 확인해보세용~

Since 2003.
지금은 맥유저...
---
http://jtjoo.com

익명 사용자의 이미지

원인을 알아냈씁니다..이유는 간단한데 호스트폴더안에 index.html 과 index.php 두개의 파일이있을경우 사이튼접속요청이 오면 자동으로 php모듈이 동작하여 index.php화면을 실행한다고 합니다.
잘 이해가 되진 않지만 암튼 이렇게 동작한다네여..ㅡㅡ;

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.