Title: Surviving without Oracle HTTP Server
1Surviving without Oracle HTTP Server
- ????????????? ?? Oracle Embedded PLSQL Gateway
????? ?????? ???????? ???????? ???
2???????
- Oracle Express Edition ?? ???????? ??? Oracle
HTTP Server powered by Apache - ??? ????? ??????????, ??????????? ? MOD_PLSQL
- ???????????? ?? ?? APEX ?? ? ????????? ??????
- ??? ????? ????????????, ????? ????? ?? ?????
?????????? ? MOD_PLSQL ? ????? ????? ?/???
??????? ?? ???? APEX
3??????? Oracle EPG
- ??????? ?? XMLDB
- ???????? Oracle Net Listener
- ????????? ???????????? ?? DAD-???
- ?????? ????? ?? OracleXE, ???? ? ?? Standard ?
Enterprise ????????
4?????????? ??????
- ??????????? ?? XMLDB
- ??????????? ?? HTTP ????
- ??????????? ?? remote access
- ????????? ?? ???????, ??????????? security-??
- ????????? ?? DAD (Data Access Descriptor)
5?????????????? ??????
- ????????? ?? ???????????? ????????? ??????
- ??????????? ?? ?????? ?? ??????????? ANONYMOUS
- ??????? ?? ??????? (????????, cascading
stylesheets, javascript, )
6????? ????????
- ?????????? ?? Oracle EPG ???? WebDAV ??????
- ?????????? ?? Oracle EPG ???? FTP ??????
7?????????? ??????
- ??????????? ?? XMLDB
- ??????????? ?? HTTP ????
- ??????????? ?? remote access
- ????????? ?? ???????, ??????????? security-??
- ????????? ?? DAD (Data Access Descriptor)
8??????????? ?? XMLDB
- ?????????? ?? ????????????
- ???? ?? ?? ???????????? ??????????? DBCA
- ???????????, ? ????? ?? ???????????, ?????? ??
??? ?????? XDBADMIN - ?????? DBMS_XDB ? DBMS_EPG
9?????????? ??????
- ??????????? ?? XMLDB
- ??????????? ?? HTTP ????
- ??????????? ?? remote access
- ????????? ?? ???????, ??????????? security-??
- ????????? ?? DAD (Data Access Descriptor)
10???????????? ?? XDB
- select from xdb.xdbconfig
- SYS_NC_ROWINFO
- --------------------------------------------------
------------------------------ - ltxdbconfig xmlns"http//xmlns.oracle.com/xdb/xdbc
onfig.xsd" xmlnsxsi"http//www.w3.org/2001/XMLSc
hema-instance" sischemaLocation"http//xmlns.ora
cle.com/xdb/xdbconfig.xsd
http//xmlns.oracle.com/xdb - /xdbconfig.xsd"gt
- ltsysconfiggt
- ltacl-max-agegt900lt/acl-max-agegt
- ltacl-cache-sizegt32lt/acl-cache-sizegt
- ltinvalid-pathname-charsgt,lt/invalid-pathname-ch
arsgt - ltcase-sensitivegttruelt/case-sensitivegt
- ltcall-timeoutgt300lt/call-timeoutgt
11??????????? ?? HTTP ????
- SQLgt update xdb.xdbconfig e Set
xmldata."sysconfig"."protocolconfig"."httpconfig".
"http-port" '8080' - 1 row updated.
- SQLgt commit
- Commit complete.
- SQLgt shutdown immediate
- Database closed.
- Database dismounted.
- ORACLE instance shut down.
- SQLgt startup
- ORACLE instance started.
- ...
- Database mounted.
- Database opened.
12??????????? ?? HTTP ????
- lsnrctl status
-
- Listening Endpoints Summary...
-
- DESCRIPTION(ADDRESS(PROTOCOLtcp)(HOSTivanov.se
mantec.bg)(PORT8080))(PresentationHTTP)(Session
RAW)) - Services Summary...
-
- Service "SPIXDB" has 1 instance(s).
- Instance "spi", status READY, has 1 handler(s)
for this service... - Service "SPI_XPT" has 1 instance(s).
- Instance "spi", status READY, has 1 handler(s)
for this service... - The command completed successfully
13??????????? ?? HTTP ????
- EXEC DBMS_XDB.SETHTTPPORT(8080)
- ???? ????? ?? ???????????? ?? ??????
14?????????? ??????
- ??????????? ?? XMLDB
- ??????????? ?? HTTP ????
- ??????????? ?? remote access
- ????????? ?? ???????, ??????????? security-??
- ????????? ?? DAD (Data Access Descriptor)
15??????????? ?? remote access
- update xdb.xdbconfig e
- Set e.xmldata."sysconfig"."protocolconfig"."httpco
nfig"."http-host" NULL - /
- update xdb.xdbconfig e
- set e.xmldata."sysconfig"."protocolconfig"."httpco
nfig"."http-host" localhost - /
16??????????? ?? remote access
- EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE)
- ?? Oracle Standard Edition ? Oracle Enterprise
Edition ??? ? LISTENER.ORA ????? - HOSTlocalhost
- ???
- HOST127.0.0.1
- ?????? ????? ???? ??????? ??????
17?????????? ??????
- ??????????? ?? XMLDB
- ??????????? ?? HTTP ????
- ??????????? ?? remote access
- ????????? ?? ???????, ??????????? security-??
- ????????? ?? DAD (Data Access Descriptor)
18????????? ?? ???????, ??????????? security-??
- ???????? BASIC authentication
- ?? ???????? ???????? ?? ???????? ? DAD
- ?? custom authentication ???? ???? ????? ????? ??
?? ?????? ??????????? ANONYMOUS - ????????? request-validation-function ?? DAD
19????????? ?? ???????, ??????????? security-??
- CREATE FUNCTION epg_access_validation (
- PROCEDURE_NAME IN VARCHAR2
- ) RETURN BOOLEAN IS
- BEGIN
- IF UPPER(procedure_name) IN () THEN
- RETURN TRUE
- ELSE
- RETURN FALSE
- END IF
- END epg_access_validation
- /
20?????????? ??????
- ??????????? ?? XMLDB
- ??????????? ?? HTTP ????
- ??????????? ?? remote access
- ????????? ?? ???????, ??????????? security-??
- ????????? ?? DAD (Data Access Descriptor)
21????????? ?? DAD
- exec dbms_epg.create_dad(
- 'DADNAME','/dadvirtualpath/')
- exec dbms_epg.set_dad_attribute(
- 'DADNAME',
- 'default-page','mypackage.myhome')
- exec dbms_epg.set_dad_attribute(
- 'DADNAME',
- 'request-validation-function',
- 'epg_access_validation')
22?????????????? ??????
- ????????? ?? ???????????? ????????? ??????
- ??????????? ?? ?????? ?? ??????????? ANONYMOUS
- ??????? ?? ??????? (????????, cascading
stylesheets, javascript, )
23????????? ?? ???????????? ????????? ??????
- DBMS_EPG.map_dad (
- dad_name gt DADNAME',
- path gt '/newvirtualpath/
- )
- DBMS_EPG.unmap_dad (
- dad_name gt DADNAME',
- path gt '/newvirtualpath/
- )
24?????????????? ??????
- ????????? ?? ???????????? ????????? ??????
- ??????????? ?? ?????? ?? ??????????? ANONYMOUS
- ??????? ?? ??????? (????????, cascading
stylesheets, javascript, )
25??????????? ?? ?????? ?? ??????????? ANONYMOUS
- exec dbms_epg.set_dad_attribute(
- 'DADNAME',
- 'database-username',
- 'ANONYMOUS
- )
26?????????????? ??????
- ????????? ?? ???????????? ????????? ??????
- ??????????? ?? ?????? ?? ??????????? ANONYMOUS
- ??????? ?? ??????? (????????, cascading
stylesheets, javascript, )
27??????? ?? ???????
- ???????? ?? DBMS_XDB
- ? ???? ????? ?? ? ?????????????, ????????? ????
?? ?? ????? ?? ??????? APEX_EPG_CONFIG.sql, ?????
???? ? Oracle Application Express
28??????? ?? ???????
- dbms_xdb.createfolder(directory_path)
- dbms_xdb.createresource(
- resource_path,
- content_bfile,
- nls_charset_id
- )
29??????????? ?? Oracle EPG ???? WebDAV ??????
30(No Transcript)
31?????????? ?? Oracle EPG ???? FTP ??????
- EXEC DBMS_XDB.SETFTPPORT(21)
- SQLgt update xdb.xdbconfig e Set
xmldata."sysconfig"."protocolconfig".ftpconfig".
ftp-port" 21'
32?????????? ?? Oracle EPG ???? FTP ??????
- e\gtftp ivanov
- Connected to ivanov.semantec.bg.
- 220- ivanov
- 220 ivanov FTP Server (Oracle XML DB/Oracle
Database) ready. - User (ivanov.semantec.bg(none)) system
- 331 pass required for SYSTEM
- Password
- 230 SYSTEM logged in
- ftpgt dir
- 200 PORT Command successful
- 150 ASCII Data Connection
- drw-r--r-- 2 SYS oracle 0 . 19
1107 public - drw-r--r-- 2 SYS oracle 0 . 19
1107 sys - -rw-r--r-- 1 SYS oracle 0 . 19
2050 xdbconfig.xml - 226 ASCII Transfer Complete
- ftp 196 bytes received in 0,01Seconds
19,60Kbytes/sec. - ftpgt
33???????(? ?????????? ????????)