WD MyBookLive apache wdnas 원본 내용 및 webdav 수정 내용
컨텐츠 정보
- 30,777 조회
- 3 댓글
- 0 추천
- 목록
본문
기존에 제가 적었던 부분에 적용하기 어려운 부분이 있어서 따로 포스팅합니다.
(WD My Book Live Webdav 활성화 후 외부에서 네트워크 드라이브 등록하기)
원본 게시물도 수정할 예정입니다.
/etc/apache2/sites-available/wdnas
파일입니다.
MBL의 펌웨어에 따라 파일 내용이 달라지므로 해당 펌웨어가 아니면 적용이 안될 수도 있으니 참조 바랍니다.
펌웨어 버전 : MyBookLive 02.43.03-022 : Core F/W
그리고 작업하기 전에 자신이 수정한 파일이라도 백업해두는 것이 좋습니다.
cp /etc/apache2/sites-available/wdnas /etc/apache2/sites-available/wdnas.org
위 명령어를 통해 백업이 되었습니다.
혹시 복원하고 싶다면
cp /etc/apache2/sites-available/wdnas.org /etc/apache2/sites-available/wdnas
이렇게 하면 됩니다.
첨부파일로 원본파일은 org가 들어있고, webdav 수정 버전은 webdav가 들어있습니다.
다운 받으려면 회원가입이 필요하기 때문에 밑에 소스를 넣어드립니다.
소스 사용방법 : 소스에 마우스를 갖다대면 오른쪽 윗부분에 네가지 아이콘이 뜹니다.
위 스샷에서 제일 왼쪽 view source를 눌러보면 팝업이 뜨는데 거기에 나오는 소스 내용을 다 긁어서 붙여넣으면 됩니다.
putty에서 붙여넣기는 마우스 우클릭하면 됩니다.
[나눔붓]1. 원본소스[/나눔]
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
<IfModule mod_rewrite.c>
RewriteLog /var/log/apache2/rewrite.log
RewriteLogLevel 0
RewriteEngine On
# address-only access redirected to User Interface
# RewriteRule ^/$ /UI/ [R]
# relocate UI
# relocate administrative REST
RewriteRule ^/api/1.0/rest/(.*) /Admin/webapp/htdocs/api/1.0/rest/index.php [L]
</IfModule>
<IfModule mod_rewrite.c>
# configure landing page for webdav applet
RewriteRule ^/LandingPage /Admin/webapp/htdocs/securityCheck.php [L,R]
</IfModule>
# additional environment variables to pass to CGI and SSI
# any way to use DocumentRoot/DOCUMENT_ROOT???
SetEnv __ADMIN_API_ROOT /var/www/Admin
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options -Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
# block application folders from being served
<Directory /var/www/Admin/webapp/config/>
Order deny,allow
Deny from all
</Directory>
<Directory /var/www/Admin/webapp/classes/>
Order deny,allow
Deny from all
</Directory>
<Directory /var/www/Admin/webapp/includes/>
Order deny,allow
Deny from all
</Directory>
#block access protected files (php/ini files)
<Directory "/var/www/Admin/webapp/htdocs/protected">
AllowOverride None
deny from all
</Directory>
<Directory "/var/www/UI/app/webroot/">
RewriteEngine On
RewriteBase /UI/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</Directory>
# comment this line if remote WebUI access is needed (WAN access)
Include /tmp/allow.conf
<Directory "/var/www/UI">
RewriteEngine on
RewriteBase /UI/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^$ app/webroot/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) app/webroot/$1 [L]
php_value memory_limit 1G
</Directory>
### unused at this time
### ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
### <Directory "/usr/lib/cgi-bin">
### AllowOverride None
### Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
### Order allow,deny
### Allow from all
### </Directory>
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
### not used at this time
### Alias /doc/ "/usr/share/doc/"
### <Directory "/usr/share/doc/">
### Options Indexes MultiViews FollowSymLinks
### AllowOverride None
### Order deny,allow
### Deny from all
### Allow from 127.0.0.0/255.0.0.0 ::1/128
### </Directory>
############################
# WebDav Extension
############################
<IfModule dav_module>
Include /etc/nas/apache2/auth/alias.inc
Include /etc/nas/apache2/auth/require.inc
</IfModule>
############################
</VirtualHost>
[나눔붓]2. webdav 수정소스[/나눔]
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
<IfModule mod_rewrite.c>
RewriteLog /var/log/apache2/rewrite.log
RewriteLogLevel 0
RewriteEngine On
# address-only access redirected to User Interface
# RewriteRule ^/$ /UI/ [R]
# relocate UI
# relocate administrative REST
RewriteRule ^/api/1.0/rest/(.*) /Admin/webapp/htdocs/api/1.0/rest/index.php [L]
</IfModule>
<IfModule mod_rewrite.c>
# configure landing page for webdav applet
RewriteRule ^/LandingPage /Admin/webapp/htdocs/securityCheck.php [L,R]
</IfModule>
# additional environment variables to pass to CGI and SSI
# any way to use DocumentRoot/DOCUMENT_ROOT???
SetEnv __ADMIN_API_ROOT /var/www/Admin
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options -Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
<Directory /webdav>
Options FollowSymLinks
AllowOverride None
</Directory>
ErrorLog /var/log/apache2/error.log
LogLevel warn
Alias /webdav /shares/Public
<Location /webdav/>
Dav On
Options Indexes
Order Deny,Allow
Deny from all
Allow from all
AuthName DeviceUser
AuthType Digest
AuthDigestDomain /webdav
AuthDigestProvider file
AuthUserFile /etc/nas/apache2/auth/htpasswd
AuthGroupFile /etc/nas/apache2/auth/htgroup
Require valid-user
</Location>
# block application folders from being served
<Directory /var/www/Admin/webapp/config/>
Order deny,allow
Deny from all
</Directory>
<Directory /var/www/Admin/webapp/classes/>
Order deny,allow
Deny from all
</Directory>
<Directory /var/www/Admin/webapp/includes/>
Order deny,allow
Deny from all
</Directory>
#block access protected files (php/ini files)
<Directory "/var/www/Admin/webapp/htdocs/protected">
AllowOverride None
deny from all
</Directory>
<Directory "/var/www/UI/app/webroot/">
RewriteEngine On
RewriteBase /UI/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</Directory>
# comment this line if remote WebUI access is needed (WAN access)
Include /tmp/allow.conf
<Directory "/var/www/UI">
RewriteEngine on
RewriteBase /UI/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^$ app/webroot/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) app/webroot/$1 [L]
php_value memory_limit 1G
</Directory>
### unused at this time
### ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
### <Directory "/usr/lib/cgi-bin">
### AllowOverride None
### Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
### Order allow,deny
### Allow from all
### </Directory>
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
### not used at this time
### Alias /doc/ "/usr/share/doc/"
### <Directory "/usr/share/doc/">
### Options Indexes MultiViews FollowSymLinks
### AllowOverride None
### Order deny,allow
### Deny from all
### Allow from 127.0.0.0/255.0.0.0 ::1/128
### </Directory>
############################
# WebDav Extension
############################
<IfModule dav_module>
Include /etc/nas/apache2/auth/alias.inc
Include /etc/nas/apache2/auth/require.inc
</IfModule>
############################
</VirtualHost>
-
등록일 2016.01.23
-
등록일 2015.12.23WD My Cloud 시놀로지OS 사용기댓글 102
-
등록일 2014.10.07
-
등록일 2014.10.06
관련자료
-
서명우성짱의 NAS를 운영하고 있습니다.
저의 즐거움이 여러분의 즐거움이면 좋겠습니다.
-
링크
-
첨부등록일 2013.11.17 21:04등록일 2013.11.17 21:04
자쿠야님의 댓글
공유기 내부망으로는 제 MBL의 대시보드에 접속이 됩니다만 외부에서 접속시
"Forbidden You don't hava permission to access /UI on this server. Additionally, a 404 not Found error was encountered while trying to use an ErrorDocument to handle the request."
접속이 금지되었다고 나오는데요. 퍼미션문제라는데 해결방법을 알 수 있을까요?