[완료] 웹서버 설정시 주소/~아이디형식으로 계정 만들때 문제 [완료]

찾다 찾다 도저히 기미가 안보여서 질문 다시 올립니다.

dyndns.org 에 가입해서 xxxxx.dyndns.com이라는 것을 하나 얻었습니다.

리눅스에 아파치 깔고 접속하면 잘 됩니다. 기본이 var/www입니다.

abcde라는 사용자 계정을 만들었습니다. 사용자가 홈페이지를 만들수 있게 하려고 합니다.

여기에다 어떻게 해야 xxxxx.dyndns.com/~abcde 형식으로 만들 수 있나요?

아니면 xxxxx.dyndns.com/abcde 이렇게라도…

아파치 가상호스트 설정은 아무리 해도 안됩니다.

<VirtualHost *:80>

ServerAdmin <!-- e --><a href="mailto:webmaster@yourdomain.co.kr">webmaster@yourdomain.co.kr</a><!-- e -->
DocumentRoot /home/abcde/public_html
ServerName xxxxx.dyndns.com (or xxxxx.dyndns.com/~abcde or abcde.xxxxx.dyndns.com/ 

</VirtualHost>

이런식으로 하면 되지 않나요? 안되네요. 어떻게 하면 이것이 가능할까요?

몇년전에 해봤을땐느 성공했었는데 안적어놔서 지금은 어떻게 하는지 모르겠습니다.

제발좀 가르쳐 주세요.

아무리 찾고 방황을 해도 답이 나오지 않네요.

[quote="선율150":2tlsrnxj]찾다 찾다 도저히 기미가 안보여서 질문 다시 올립니다.

dyndns.org 에 가입해서 xxxxx.dyndns.com이라는 것을 하나 얻었습니다.

리눅스에 아파치 깔고 접속하면 잘 됩니다. 기본이 var/www입니다.

abcde라는 사용자 계정을 만들었습니다. 사용자가 홈페이지를 만들수 있게 하려고 합니다.

여기에다 어떻게 해야 xxxxx.dyndns.com/~abcde 형식으로 만들 수 있나요?

아니면 xxxxx.dyndns.com/abcde 이렇게라도…

아파치 가상호스트 설정은 아무리 해도 안됩니다.

<VirtualHost *:80>

ServerAdmin <!-- e --><a href="mailto:webmaster@yourdomain.co.kr">webmaster@yourdomain.co.kr</a><!-- e -->
DocumentRoot /home/abcde/public_html
ServerName xxxxx.dyndns.com (or xxxxx.dyndns.com/~abcde or abcde.xxxxx.dyndns.com/ 

</VirtualHost>

이런식으로 하면 되지 않나요? 안되네요. 어떻게 하면 이것이 가능할까요?

몇년전에 해봤을땐느 성공했었는데 안적어놔서 지금은 어떻게 하는지 모르겠습니다.

제발좀 가르쳐 주세요.

아무리 찾고 방황을 해도 답이 나오지 않네요.[/quote:2tlsrnxj]

아파치 설정따라 다르겠지만 보통 유저 abcde 의 웹페이지는 그 유저 홈디렉토리에 public_html 이라는 폴더를 만들면 되요. 그리고 그 폴더에 index.html 같은 화일을 넣어두면 되구요.

아파치 설정에서는 UserDir public_html 만 해주면 됩니다. DocumentRoot는 유저 홈페이지가 아니고 그 싸이트 홈페이지 정해주는거구요.

UserDir public_html이라는 곳은 없는듯 하네요. 추가 하라는 말씀인가요?
UserDir ~추가후 재시작시 에러 입니다.

  • Restarting web server apache2
  • We failed to correctly shutdown apache, so we’re now killing all running apache processes. This is almost certainly suboptimal, so please make sure your system is working as you’d expect now!
    … waiting Syntax error on line 292 of /etc/apache2/apache2.conf:
    Invalid command ‘UserDir’, perhaps misspelled or defined by a module not included in the server configuration
    …fail!
    root@sulpn:/etc/apache2#

해당 아이디의 아래에 public_html폴더 만들고 권한을 chmod a+x 로 주고 그아래에 index.html파일 만들어줬습니다.
지금현재 설정은 apache2.conf파일은 기본 설정, 버추어호스트 설정 역시 초기 설정으로 변경하였습니다.
말씀하신 DocumentRoot 도 /var/www로 변경했습니다.
저장하고 다시 들어가 보면

’ 페이지를 찾을 수 없습니다. ’
검색 중인 페이지가 제거되었거나 이름이 변경되었거나 일시적으로 사용할 수 없습니다.

다음을 시도해 보십시오.
페이지 주소를 주소 표시줄에 입력한 경우 해당 주소를 올바르게 입력했는지 확인하십시오.
홈 페이지를 열고 원하는 정보가 있는 링크를 검색하십시오.
Click the 뒤로단추를 클릭하여 다른 링크를 시도하십시오.
인터넷에서 정보를 찾으려면 검색을 클릭하십시오.

HTTP 404 - 파일을 찾을 수 없음
Internet Explorer

이렇게 나옵니다.
이거 왜 안될까요… phpmyadmin 설치했는데 상관은 없겠죠?

참고로 설정부분 올립니다.

<VirtualHost *:80>
ServerAdmin webmasger@localhost

    DocumentRoot /var/www
    &lt;Directory /&gt;
            Options FollowSymLinks
            AllowOverride None
    &lt;/Directory&gt;

    &lt;Directory /var/www&gt;
            Options Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from all
    &lt;/Directory&gt;

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    &lt;Directory &quot;/usr/lib/cgi-bin&quot;&gt;
            AllowOverride None
            Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
            Order allow,deny
            Allow from all
    &lt;/Directory&gt;

    ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/access.log combined

Alias /doc/ &quot;/usr/share/doc/&quot;
&lt;Directory &quot;/usr/share/doc/&quot;&gt;
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
&lt;/Directory&gt;

==================================================================
apache.conf 설정 파일

ServerRoot "/etc/apache2"
ServerAdmin webmaster@localhost
DocumentRoot "/var/www"

LockFile /var/lock/apache2/accept.lock

PidFile ${APACHE_PID_FILE}

Timeout 300

KeepAlive On

MaxKeepAliveRequests 100

KeepAliveTimeout 15

<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
</IfModule>

<IfModule mpm_worker_module>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>

User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

AccessFileName .htaccess

<Files ~ "^.ht">
Order allow,deny
Deny from all
</Files>

DefaultType text/plain

HostnameLookups Off

ErrorLog /var/log/apache2/error.log

LogLevel warn

Include /etc/apache2/mods-enabled/.load
Include /etc/apache2/mods-enabled/
.conf

Include /etc/apache2/httpd.conf

Include /etc/apache2/ports.conf

LogFormat "%v:%p %h %l %u %t &quot;%r&quot; %>s %b &quot;%{Referer}i&quot; &quot;%{User-Agent}i&quot;" vhost_combined
LogFormat "%h %l %u %t &quot;%r&quot; %>s %b &quot;%{Referer}i&quot; &quot;%{User-Agent}i&quot;" combined
LogFormat "%h %l %u %t &quot;%r&quot; %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined

Include /etc/apache2/conf.d/

Include the virtual host configurations:

Include /etc/apache2/sites-enabled/

userdir 에 대한 모듈로드와 설정은 다음과 같습니다.

haze11@byulroo:/etc/apache2/mods-enabled$ ls -l userdir.*
lrwxrwxrwx 1 root root 30 2009-07-29 22:43 userdir.conf -> …/mods-available/userdir.conf
lrwxrwxrwx 1 root root 30 2009-07-29 22:43 userdir.load -> …/mods-available/userdir.load

없으면 링크 만들어주세요.

우분투 아파치2 설정은 나누어져 있습니다. (/etc/apach2 디렉이하 )

[color=#0000BF:de70q8v8]/etc/apache2/mods-available에 설정들이 /etc/apache2/mods-enabled에 심볼릭 걸리면 적용 됩니다.[/color:de70q8v8]

따라서 user dir 활성화는 그냥
[color=#BF8000:de70q8v8]sudo ln -s /etc/apache2/mods-available/userdir.load /etc/apache2/mods-enabled/userdir.load
sudo ln -s /etc/apache2/mods-available/userdir.conf /etc/apache2/mods-enabled/userdir.conf[/color:de70q8v8]
해준 후 아파치 재시작 하면 됩니다.
[color=#BF8000:de70q8v8]sudo apache2ctl -k graceful[/color:de70q8v8] 또는 [color=#BF8000:de70q8v8]sudo /etc/init.d/apache2 restart[/color:de70q8v8]

다른 추가 하신 설정 다시 지운 후 위 설명대로 해보시기 바랍니다.

감솨 합니다. 문제는 링크였네요. … 이렇게 간단한건데 엄청 헤매고 책도 찾아보고 그랬네요…
단번에 해결 되었습니다. 정말 감사합니다. ~~~ ^^;

[quote="선율150":3a8esn7u]감솨 합니다. 문제는 링크였네요. … 이렇게 간단한건데 엄청 헤매고 책도 찾아보고 그랬네요…
단번에 해결 되었습니다. 정말 감사합니다. ~~~ ^^;[/quote:3a8esn7u]
해결된 글타래는 처음 질문 글 편집 눌러
제목에 [완료]웹서버 설정시 주소/~아이디형식으로 계정 만들때 문제
로 완료 낳어주는(바꾸는) 센스 ;)

a2enmod userdir 을 실행해도 될 것 같은 기분이?

[quote="haze11":iutgwlwe]a2enmod userdir 을 실행해도 될 것 같은 기분이?[/quote:iutgwlwe]
저도 같은 기분이 드는 건 왜일까요? :roll:

그렇게 실행하면 되는 건가요?
]$ a2enmod userdir <– 요렿게?

제가 처음이라 센스 있는것을 몰랐네요. ^^;
센스 만들러 갑니다.~~~ ㅎㅎ

[quote="haze11":vbzf29qy]a2enmod userdir 을 실행해도 될 것 같은 기분이?[/quote:vbzf29qy]

되네요 ㅋ 도메인/~계정