편집을 취소할 수 있습니다. 이 편집을 되돌리려면 아래의 바뀐 내용을 확인한 후 게시해주세요.
최신판 | 당신의 편집 | ||
1번째 줄: | 1번째 줄: | ||
==미디어위키 폴더 이름 변경== | ==미디어위키 폴더 이름 변경== | ||
[[미디어위키 폴더]] 이름이 w가 아니었다면 w로 변경 | [[미디어위키 폴더]] 이름이 w가 아니었다면 w로 변경 | ||
< | <source lang='dos'> | ||
[root@ | [root@jmnote www]# ll | ||
... | ... 생략 | ||
drwxr-xr-x 16 root root 4096 Aug 16 17:58 mediawiki | drwxr-xr-x 16 root root 4096 Aug 16 17:58 mediawiki | ||
[root@ | [root@jmnote www]# mv mediawiki w | ||
[root@ | [root@jmnote www]# ll | ||
... | ... 생략 | ||
drwxr-xr-x 16 root root 4096 Aug 16 17:58 w | drwxr-xr-x 16 root root 4096 Aug 16 17:58 w | ||
</ | </source> | ||
==[[LocalSettings.php]] 수정== | ==[[LocalSettings.php]] 수정== | ||
;수정 전 | |||
< | <source lang='php'> | ||
$wgScriptPath = "/mediawiki"; | $wgScriptPath = "/mediawiki"; | ||
$wgScriptExtension = ".php"; | $wgScriptExtension = ".php"; | ||
</ | </source> | ||
;수정 후 | |||
< | <source lang='php'> | ||
$wgScriptPath = "/w"; | $wgScriptPath = "/w"; | ||
$wgScript = "$wgScriptPath/index.php"; | $wgScript = "$wgScriptPath/index.php"; | ||
$wgArticlePath = "/wiki/$1"; | $wgArticlePath = "/wiki/$1"; | ||
$wgScriptExtension = ".php"; | $wgScriptExtension = ".php"; | ||
</ | </source> | ||
==httpd.conf 수정== | |||
== | [[httpd.conf]] 파일에 DocumentRoot 다음에 추가 | ||
<source lang='bash'> | |||
< | |||
# DocumentRoot: The directory out of which you will serve your | # DocumentRoot: The directory out of which you will serve your | ||
# documents. By default, all requests are taken from this directory, but | # documents. By default, all requests are taken from this directory, but | ||
# symbolic links and aliases may be used to point to other locations. | # symbolic links and aliases may be used to point to other locations. | ||
# | # | ||
DocumentRoot "/var/www | DocumentRoot "/var/www" | ||
#RedirectMatch /mediawiki/index.php/(.*)$ http://jmnote.com/wiki/$1 | #RedirectMatch /mediawiki/index.php/(.*)$ http://jmnote.com/wiki/$1 | ||
#RedirectMatch /mediawiki/index.php?(.*)$ http://jmnote.com/w/index.php?$1 | #RedirectMatch /mediawiki/index.php?(.*)$ http://jmnote.com/w/index.php?$1 | ||
Alias /w/index.php /web/jmnote/www/w/index.php | |||
Alias /wiki / | Alias /wiki /web/jmnote/www/w/index.php | ||
Alias /index.php / | Alias /index.php /web/jmnote/www/w/index.php | ||
Alias /w/skins/ / | Alias /w/skins/ /web/jmnote/www/w/skins/ | ||
Alias /w/images/ / | Alias /w/images/ /web/jmnote/www/w/images/ | ||
</ | </source> | ||
:→ RedirectMatch는 기존 주소<ref>http | :→ RedirectMatch는 기존 주소<ref>http;//도메인/mediawiki/index.php/표제어</ref>를 새 주소<ref>http;//도메인/wiki/표제어</ref>로 포워딩해주는 역할을 한다. | ||
:→ 검색엔진에 등록된 기존 주소가 끊어지지 않도록 하려면 | :→ 새 사이트 구축시는 필요 없다. | ||
:→ 검색엔진에 등록된 기존 주소가 끊어지지 않도록 하기 하려면 주석 해제. | |||
==[[아파치 재시작]]== | |||
< | <source lang='dos'> | ||
[root@ | [root@jmnote www]# service httpd restart | ||
Stopping httpd: [ OK ] | Stopping httpd: [ OK ] | ||
Starting httpd: [ OK ] | Starting httpd: [ OK ] | ||
</ | </source> | ||
==참고== | ==참고 자료== | ||
*https://www.mediawiki.org/wiki/Manual:Short_URL | *https://www.mediawiki.org/wiki/Manual:Short_URL | ||
[[분류: 미디어위키]] | [[분류: 미디어위키]] | ||
[[분류: URL]] | [[분류: URL]] |