Apache2에서 Port를 바꾸는 방법은 어떻게 하면 되나요?

explayer의 이미지

현재 haansoftlinux2005 WKS버젼을 사용중입니다.

집에서 간단하게 웹서버를 만들어볼려고 http.conf파일의

Port와 Listen를 제 임의의 포트로 바꾸었으나 httpd -k restart를 하면

Syntax error on line 239 of /etc/httpd/conf/httpd.conf:
Port was replaced with Listen in Apache 2.0

위의 에러메세지가 나오면서 되지 않습니다.

예전에 다른 리눅스로 셋팅되어 있을땐 Port와 Listen를 제 임의대로 조정

해서 사용했었는데...

혹시나 싶어서 /etc/service에서 http 포트 또한 제가 임의로 바꾸고자하는 포트로

바꾸어서 해보았으나 정상적으로 작동되지 않더군요...

회원님들의 도움을 요청드립니다.

codebank의 이미지

아파치의 설정파일의 Listen항목만 포트설정에 사용하는 것으로 알고 있습니다.
즉, Port라는 값은 사용되지 않는 값으로 에러메시지에서도 명시하고 있습니다.
Port라는 것은 Apache 2.0에서 바뀌었다고요...
Port값을 삭제하고 다시 시도해보세요.

------------------------------
좋은 하루 되세요.

explayer의 이미지

아무래도 포트문제가 아닌듯 합니다.

netstat로 보면 제가 할당한 포트가 잘 동작하고 있더군요..

아무래도 아파치가 2.0으로 업글되면서 뭔가 바뀐거 같습니다.

conf파일에서 권한설정이나 뭔가가 바뀐거 같은데...

일부로 /var/www/html 디렉의 퍼미션도 다 풀어봤지만 접속하면

아래의 메세제만 나온답니다...

Forbidden
You don't have permission to access / on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

--------------------------------------------------------------------------------

Apache/2.0.52 (Haansoft Linux) Server at XXX.XXX.XXX.XXX Port 1111

어찌하면 제 리눅스에다가 웹을 올릴수 있을까요??ㅜ.ㅜ

세이군의 이미지

explayer wrote:

Syntax error on line 239 of /etc/httpd/conf/httpd.conf:
Port was replaced with Listen in Apache 2.0

235번째 줄부터 245번째줄까지를 복사해서 올려주세요..
rekcuf의 이미지

그냥 http://127.0.0.1:1111 로 하면 잘 되시나요?

# apt-get install HOPE

explayer의 이미지

rekcuf wrote:
그냥 http://127.0.0.1:1111 로 하면 잘 되시나요?

그렇게 하니깐요...

Forbidden
You don't have permission to access / on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

--------------------------------------------------------------------------------

Apache/2.0.52 (Haansoft Linux) Server at XXX.XXX.XXX.XXX Port 1111

위와 같이 나오는데요...ㅡㅡa

모가 문제일까요... 이젠 포트문제가 아니라 http.conf의 문제인것 같아요...ㅡㅡ;;

에효.. 이것땜시 삼일동안 헤메고 있습니다...ㅡㅡ

댓글 달기

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