Forum Stats

  • 3,740,929 Users
  • 2,248,346 Discussions
  • 7,861,504 Comments

Discussions

Change Database Homepage Port

449049
449049 Member Posts: 6
I use to run Apache Tomcat on port 8080. Does one of you guys know how to change the database homepage port to 8081, or something else?

The installation under Windows XP did not offer such an option.

Thank you.
«1

Comments

  • Srinivas
    Srinivas Member Posts: 61
    Login to the database with SYSDBA privileges.

    SQL> exec dbms_xdb.sethttpport('8081');

    Bounce the database or start-stop OracleServiceXE.(I am not sure if this is required)

    Try accessing the new port.

    The .url files in ORACLE_HOME have to be updated to keep your start-menu shortcuts working (they may still be pointing to 8080).
  • 449049
    449049 Member Posts: 6
    Thank you very much. Problem solved.
  • sveh
    sveh Member Posts: 4
    I change it to port 80.
    Restart it isn't required.
  • 441000
    441000 Member Posts: 118
    Hello,

    I have done this with port 80.

    When I go to

    http://127.0.0.1/htmldb

    It works fine.

    When I do this:

    http://127.0.0.1/

    I get the text on the browser below, running on Windows 2000. How can I stop the directory being browser and redirect always to http://127.0.0.1/htmldb?
    Index of /
    Name Last modified Size
    i/ Wed, 02 Nov 2005 01:00:00 GMT -
    public/ Mon, 10 Oct 2005 10:00:00 GMT-
    sys/ Mon, 10 Oct 2005 10:00:00 GMT


    -
  • sveh
    sveh Member Posts: 4
    Hello!

    Run SQL Command Line, connect as system and write:

    declare
    result boolean;
    v_html varchar2(512);
    begin
    v_html := '<html><body>< a href="/htmldb">Home page< /a></body></html>';
    -- DBMS_XDB.deleteResource('/index.html');
    result := dbms_xdb.createresource('/index.html',v_html);
    commit;
    end;
    /
  • 241066
    241066 Member Posts: 776
    Be careful doing this. We may use this page in the production version to display a welcome page, or perhaps even the license details. As such, the production release may attempt to change this page during the upgrade from beta. I doubt we will cater for situations where the page has been removed or changed from what we expect to find there.
  • Dietmar Aust
    Dietmar Aust Member Posts: 1,939 Bronze Badge
    Hi Greg,

    perhaps it might be a good choice to have an standalone Apache server running in front of XE for several reasons.

    You could then set up the standalone Apache running on port 80 as a proxy to XE running on port 8080.

    You could then configure it the following way in the httpd.conf:
    ProxyPass /htmldb http://127.0.0.1:8080/htmldb
    ProxyPassReverse /htmldb http://127.0.0.1:8080/htmldb
    ProxyPass /i http://127.0.0.1:8080/i
    ProxyPassReverse /i http://127.0.0.1:8080/i

    and the index.html in your Apache/htdocs directory could do a redirect to /htmldb.
    Done.

    It might be worth considering.

    Regards,
    ~Dietmar.
  • 466360
    466360 Member Posts: 40
    edited Nov 10, 2005 12:28AM
    &gt; You could then configure it the following way in the

    &gt; httpd.conf:

    &gt; ProxyPass /htmldb http://127.0.0.1:8080/htmldb

    &gt; ProxyPassReverse /htmldb

    &gt; b http://127.0.0.1:8080/htmldb

    &gt; ProxyPass /i http://127.0.0.1:8080/i

    &gt; ProxyPassReverse /i http://127.0.0.1:8080/i

    &gt;


    Dietmar, thanks for sharing this.


    But WOW ! the response is at least 5 X s.l.o.w.e.r !!!
    <img src="http://www.iamviet.com/forum/images/smilies/smilie_pop_eyes.gif" alt="" />
  • 466360
    466360 Member Posts: 40
    edited Nov 10, 2005 12:28AM
  • 466340
    466340 Member Posts: 52
    But WOW ! the response is at least 5 X s.l.o.w.e.r !!!
    Yeah, I was wondering how that passthrough technique would affect performance. Is there any other way to access XE schema's directly instead of through htmlDB/XDB - is it possible to run apache with mod_plsql?

    I take it that would take a separate oracle home with a licenced version of the DB or appserver to achieve?

    Any thoughts?

    Regards,

    Mike
  • 466340
    466340 Member Posts: 52
    ok, so I just read up on dbms_epg, so that answers the first part...

    http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_epg.htm

    I guess there's still the performance question though...
  • Hi Mike:
    You can use DBPrism Servlet Engine mod_plsql emulation.
    http://www.dbprism.com.ar/dbprism/doc/Home.html
    Latest version (CVS) works perfect with HTMLDB installed on XE, you can download a zip version from files section of Yahoo groups:
    http://groups.yahoo.com/group/dbprism/files/patchs/
    htmldb-11-08-05.zip is ready to use deployment for OC4J and Tomcat mapped as http://localhost:8888/htmldb/ for example.
    You only need to download the HTMLDB static resources (http://localhost:8080/i) using wget or any download accelerator program and put them into the ORACLE_HOME/j2ee/home/default-web-app or into TOMCAT_HOME/webapps/ROOT for example.
    Your performance will be enhanced using this configuration and you will have many other features provides by DBPrism.
    Best regards, Marcelo.
  • Dietmar Aust
    Dietmar Aust Member Posts: 1,939 Bronze Badge
    edited Nov 11, 2005 2:24PM
    Hi,

    I could reproduce the problem using the latest Apache 2 (2.0.55) and it was terribly slow.

    Using Apache 1.3.33 it was REALLY FAST, no performance differences at all.

    Don't know why it is so slow using Apache2, but Apache 1.3.33 works really well.

    Regards,
    ~Dietmar.

    P.S.: I used both on Windows XP SP2, haven't checked on Linux

    Message was edited by:
    daust_de
  • 466340
    466340 Member Posts: 52
    Thanks for the pointers on DBPrism Marcelo, I'll check it out.

    Dietmar - I did a search on proxypass performance, and came up with a mention of a bug in Apache 2 from http://www.apacheweek.com/features/reverseproxies -

    Check libxml2 is installed. If you have a version older than 2.5.10, then upgrade - there's a bug in earlier versions that can, in some particular cases, severely affect performance.

    Not sure if thats it, but it could be the culprit.

    Cheers,

    Mike
  • 466360
    466360 Member Posts: 40
    I could reproduce the problem using the latest Apache
    2 (2.0.55) and it was terribly slow.

    Using Apache 1.3.33 it was REALLY FAST, no
    performance differences at all.
    I did the ProxyPass workaround with OHS/Apache 1.3.28. that came with 10gR1

    Painfully slow..like going thru a proxy located in the Congos or something....
  • Dietmar Aust
    Dietmar Aust Member Posts: 1,939 Bronze Badge
    Hi,

    I have tried again using "Oracle-Application-Server-10g/10.1.2.0.0" that came with the 10gR2 companion CD on Windows XP SP2.

    No problems there. I used the following configuration:

    ProxyPass /htmldb http://127.0.0.1:8080/htmldb
    ProxyPassReverse /htmldb http://127.0.0.1:8080/htmldb
    ProxyPass /i http://127.0.0.1:8080/i
    ProxyPassReverse /i http://127.0.0.1:8080/i
    ProxyPass /sys http://127.0.0.1:8080/sys
    ProxyPassReverse /sys http://127.0.0.1:8080/sys

    Which OS did you use it on, Linux or Win?
    Perhaps a firewall / webwasher / filter kind of problem?

    Regards,
    ~Dietmar.
  • 466360
    466360 Member Posts: 40
    Which OS did you use it on, Linux or Win?
    Perhaps a firewall / webwasher / filter kind of
    problem?
    Hi dietmar,

    Apache 1.3.28 on Win XP (Host)
    XE on RHEL3 (on VirtualMachine: 372 MB RAM)
    All on my laptop.

    so
    No proxy: Browser on direct XP <---> XE no delay
    with ProxPpass: slow
  • Dietmar Aust
    Dietmar Aust Member Posts: 1,939 Bronze Badge
    Hi Robert,

    sorry, I am unfamiliar with running virtual machines and the involved tcp/ip communication on the same machine.

    Nevertheless, since you are already using an Oracle Http-Server on your XP host, you might as well try to configure your modplsql DAD there for "remote" connecting to your XE database on your virtual machine running Linux. You would have to set up your images directory for HTMLDB on your XP host, though. You can find the information in the htmldb installation guide on how set it up.

    This way you wouldn't have to use the Proxy/Reverse proxy feature of the Apache server.

    Sorry, but I cannot test your original scenario since I don't have an installation of XE running in a virtual machine.

    Regards,
    ~Dietmar.
  • 466360
    466360 Member Posts: 40
    edited Nov 13, 2005 2:46PM
    &gt; Nevertheless, since you are already using an Oracle

    &gt; Http-Server on your XP host, you might as well try to

    &gt; configure your modplsql DAD there for \&quot;remote\&quot;

    &gt; connecting to your XE

    <p>dietmar, danke


    Oh I wanted to do that straight out.

    But not sure how to configure the DAD for XE (Home Page).

    I 341440 and Mark directed me to this thread.


    Have you done that ? OHS/Apache directly to XE Home Page?


    I tried a test DAD:

    &lt;Location /xehr&gt;

    &nbsp;&nbsp;SetHandler pls_handler

    &nbsp;&nbsp; Order deny,allow

    &nbsp;&nbsp; Allow from all

    &nbsp;&nbsp;AllowOverride None

    &nbsp;&nbsp;PlsqlDatabaseUsername hr

    &nbsp;&nbsp;PlsqlDatabasePassword hr

    &nbsp;&nbsp;PlsqlDatabaseConnectString 192.168.50.127:1521:xe ServiceNameFormat

    &nbsp;&nbsp;PlsqlAuthenticationMode Basic

    &nbsp;&nbsp;PlsqlDefaultPage hr.hrpkg.hello_world

    &nbsp;&nbsp;PlsqlDocumentTablename documents

    &nbsp;&nbsp;PlsqlUploadAsLongRaw

    &nbsp;&nbsp;PlsqlSessionStateManagement StatelessWithFastResetPackageState

    &nbsp;&nbsp;PlsqlErrorStyle DebugStyle

    &nbsp;&nbsp;PlsqlNLSLanguage AMERICAN_AMERICA.WE8MSWIN1252

    &lt;/Location&gt;


    I runs "hello_world" fine. But I'm not sure how to configure one for the XE Home Page.
    thanks
    </p>
  • Dietmar Aust
    Dietmar Aust Member Posts: 1,939 Bronze Badge
    Hi Robert,
    Have you done that ? OHS/Apache directly to XE Home Page?
    No, I haven't done it before, but since you asked :).

    I have just tested it and it works using the following steps:

    1) copy the images "directory" from the XE installation (it seems like you can use the /i/ directory from the htmldb 2.0 distribution, but at least some images are broken then, thus I copied the new ones):
    Connect to the XE installation http://<host>:<port>/ using webdav (open as webfolder in IE)
    and copy the /i/ directory to your server.
    (I copied it to /downloads/XE_images/)

    2) configure the following mapping in the dads.conf:
    Alias /i/ /downloads/XE_images/i/
    <Location /pls/xe>
    Order deny,allow
    PlsqlDocumentPath docs
    AllowOverride None
    PlsqlDocumentProcedure wwv_flow_file_manager.process_download
    PlsqlDatabaseConnectString daust2:1521:XE
    PlsqlNLSLanguage AMERICAN_AMERICA.AL32UTF8
    PlsqlAuthenticationMode Basic
    SetHandler pls_handler
    PlsqlDocumentTablename wwv_flow_file_objects$
    PlsqlDatabaseUsername hr
    PlsqlDatabasePassword <password for HR>
    PlsqlDefaultPage htmldb
    Allow from all
    PlsqlErrorStyle ModplsqlStyle
    </Location>

    3) run it via http://<apache host>:<port>/pls/xe

    Voila!

    I have it working but I guess I wouldn't recommend it using it this way.
    If you wanted to use the pl/sql gateway from Oracle you would have to have a license for 10g anyway and thus you could simply use htmldb 2.0 in your 10g database.

    I managed to install the Proxy / Reverse proxy using a standalone Apache Http-Server in ten minutes, so this is a real option.

    Regards,
    ~Dietmar.

    P.S.: In XE Oracle uses the database account ANONYMOUS, but I couldn't figure out the password. It works well using the default test user HR, any other account should do fine as well, I guess.
  • 466360
    466360 Member Posts: 40
    edited Nov 13, 2005 5:52PM
    heheh thanks dietmar, works as advertised&nbsp;<img src="http://members.shaw.ca/wenpigsfly/smileys/thumb.gif" alt="" />


    &gt; P.S.: In XE Oracle uses the database account

    &gt; ANONYMOUS, but I couldn\'t figure out the password. It

    &gt; works well using the default test user HR, any other

    &gt; account should do fine as well, I guess.


    same as the one for \&quot;system\&quot; set during configuration.
    ------------------------------------------
    hope google can pick this up:

    on Windows, individual DAD password can be obfuscated
    with: dadobf.exe dadobf pw-to-be-obfuscated
  • 466340
    466340 Member Posts: 52
    Hi Dietmar,

    I installed Apache on my XP SP2 machine alongside XE, and was also experiencing the performance issue.

    Here's what I did -
    obtained apache distro 2.0.55 binaries from: http://apache.ausgamers.com/httpd/binaries/win32/apache_2.0.55-win32-x86-no_ssl.msi

    Installed on port 80 (there was nothing else there) - confirmed that default apache index.html displayed ok.

    Modified httpd.conf as follows -
    uncommented the following modules:

    LoadModule proxy_module modules/mod_proxy.so
    LoadModule proxy_connect_module modules/mod_proxy_connect.so
    LoadModule proxy_http_module modules/mod_proxy_http.so

    Added the lines at the bottom of the file (i.e. not in virtual host or other container)

    ProxyPass /htmldb http://127.0.0.1:8080/htmldb
    ProxyPassReverse /htmldb http://127.0.0.1:8080/htmldb
    ProxyPass /i http://127.0.0.1:8080/i
    ProxyPassReverse /i http://127.0.0.1:8080/i
    ProxyPass /sys http://127.0.0.1:8080/sys
    ProxyPassReverse /sys http://127.0.0.1:8080/sys

    But It went as slowly as a wet week!

    I configured an extra entry to reverse proxy our corporate website, and it ran with no performance problems at all - so I suspected it had something to do with the apache/XE listener combo

    I replaced your proxypass entries above with the following to see if it was a problem with the XE listener:

    ProxyRequests Off

    <Location /htmldb>
    ProxyPass http://127.0.0.1:8080/htmldb
    ProxyPassReverse http://127.0.0.1:8080/htmldb
    SetEnv force-proxy-request-1.0 1
    </Location>

    <Location /i>
    ProxyPass http://127.0.0.1:8080/i
    ProxyPassReverse http://127.0.0.1:8080/i
    SetEnv force-proxy-request-1.0 1
    </Location>

    <Location /sys>
    ProxyPass http://127.0.0.1:8080/sys
    ProxyPassReverse http://127.0.0.1:8080/sys
    SetEnv force-proxy-request-1.0 1
    </Location>

    Guess what? - it runs like greased lightening... So, either it is a problem with the original config that you gave, or XE has a problem responding to http 1.1 proxy requests...

    Mike
  • 466360
    466360 Member Posts: 40
    I replaced your proxypass entries above with the following to see if it was a problem with the XE listener:
    I tried it on OHS/Apache 1.3.28 - OHS won't start :(
  • 466340
    466340 Member Posts: 52
    hmmm bugger. version related thing?

    what'd your apache log say ("error_log" usually found in Apache\Apache\logs\of the oracle home)?

    Mike
  • 466340
    466340 Member Posts: 52
    Ok, it appears that Apache 1.3 doesn't like the location container.

    Try this Robert -

    #----------
    #
    ProxyRequests Off

    SetEnv force-proxy-request-1.0 1
    SetEnv proxy-nokeepalive 1

    ProxyPass /htmldb http://127.0.0.1:8080/htmldb
    ProxyPassReverse /htmldb http://127.0.0.1:8080/htmldb
    ProxyPass /i http://127.0.0.1:8080/i
    ProxyPassReverse /i http://127.0.0.1:8080/i
    ProxyPass /sys http://127.0.0.1:8080/sys
    ProxyPassReverse /sys http://127.0.0.1:8080/sys

    #
    #----------


    It worked for me from our 9.2 DB's OHS, it also works in Apache 2 in place of the stuff above.

    Cheers,

    Mike
This discussion has been closed.