우분투 httpd 관련 질문입니다.

neotree21의 이미지

주소창에 저희 집 ip주소 클릭하면 바로 제가 html 설정한게 떠야 될텐데... 먼저 index of/ 이렇게 뜬다음에 apache2-default 를 클릭해야 제가 설정한 html 이 뜨거든요?

바로 제가 설정한 html 이 떠야될텐데 말입니다...

도움말 보니깐

/etc/apache2/apache2.conf에 있는 RedirectMatch의 주석을 풀면 연결 요청이 /var/www/apache2-default로 연결되어 아파치2의 기본 웹사이트를 볼 수 있게 됩니다. 서버의 가상호스트 파일에 있는 이 값을 바꾸고, 필요한 경우에는 그 디렉토리를 변경하는 것은 잊지 마십시오.

이렇게 말하던데 RedirectMatch 이 라인을 도저히 못찾겠거든요. 어떻게 해야되죠?

답변을 기다리겠습니다.

dominion의 이미지

제가 사용하는 것은 우분투가 아니라 데비안이지만 기본적으로 비슷한 배포본이기 때문에 참고하시라고 적습니다

일단 /etc/apache2/sites-available 디렉토리 안에 default 파일을 확인해 보세요.
거기 보시면 neotree21님이 찾으시는 RedirectMatch 지시어를 찾으실 수 있습니다.
저의 경우에는 위 지시자 앞에 #문자를 붙여 무효화 시켰습니다.
그러니 /var/www이 기본적인 웹 루트 디렉토리가 되더군요.

요즘 배포본을 보면 설정 파일들이 여러개로 쪼개지는 경향이 있는 것 같습니다.
아파치의 경우 설정 파일들이 몇개 됩니다.

1. /etc/apache2/ 에 위치하고 있는 apache2.conf, httpd.conf(<-이 설정 파일은 텅 빈 파일이더군요. 아마도 호환성 때문에 남겨둔 듯 합니다.), ports.conf, envvars,
2. /etc/apache2/conf.d 디렉토리 아래 있는 charset,
3. /etc/apache2/sites-available 아래에 있는 default

그외에도 /etc/apache2/mod-* 아래에 있는 파일들을 통해서 모듈을 올리거나 내리는 것 같더군요.
도움이 되셨길 바랍니다.

댓글 달기

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
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.