12 Replies Latest reply: May 28, 2008 3:09 PM by 443026 RSS

    Web Cache 10g Strange Port Redirection

    Nikolaj
      Hi,
      I have installed Oracle AS 10g 10.1.2 at one server (Solaris 9).

      1) Oracle Apache Server is listenning port 81 and specific IP. No apache virtual hosts are configured at this port. In httpd.conf i have these directives:
      Port 81
      Listen xxx.xxx.xxx.xxx:81

      2) Web Cache is listenning port 80 and the same IP as Apache Server.

      3) In Web Cache, I've added one origin server with 81 port and HTTP protocol (host and port of Apache server, from item 1).

      4) Сreated new named site at port 80, which was mapped to Origin server created item 2.

      My application is deployed to url /myapp, and after configuring Web Cache as described, I could access it by typing:
      http://<host>/myapp

      But when click to any link in my app, my browser is redirected to URL with specific port

      http://<host>:81/myapp

      Where :81 is Apache Server port from "Port" directive in httpd.conf. If I change "Port" directive to different value, for example 80, browser is redirected to http://<host>:0/myapp

      Could, you help me? I need no port in my URL at all (port 80 for HTTP and 443 for HTTPS).
        • 1. Re: Web Cache 10g Strange Port Redirection
          432524
          Hi Nikolajs!
          This is somewhat difficult because I have not all info about your application and cfg.

          You need to look into the following issues:
          a) in Apache
          - virtual hosts
          - rewriting
          b) in mod_plsql/DADS
          - PlsqlCGIEnvironmentList

          cu
          Andreas
          • 2. Re: Web Cache 10g Strange Port Redirection
            Nikolaj
            Hello, Andreas!
            Thank you for answer.

            a) About Apache
            - I have no virtual hosts defined except default (127.0.0.1 at port 7201 - for HTTP server diagnostic)
            - I'm not using rewriting (default configs after installation)

            b) About mod_plsql/DADS - my application doesn't use PL/SQL at all it is test app only for demo purpose.

            All naviġation is performed over one servlet, which recieves request by method post, and uses sendRedirect method to redirect user reuqests:

            // Using encodeRedirectURL to attach session id if session cookies are disabled at client side
            String url = response.encodeRedirectURL("<URL>");
            response.sendRedirect(url);

            where <URL> is relative url, for example "test.jsp"

            About my general AS configuration, I haven't changed it after installation.

            I couldn't find any information or advises about such problems neither in Web Cache documentation nor metalink.

            Nikolaj
            • 3. Re: Web Cache 10g Strange Port Redirection
              Nikolaj
              If I disable Web Cache and create virtual host for example at port 80, my application works fine.

              Problem appears only when using Web Cache.
              • 4. Re: Web Cache 10g Strange Port Redirection
                431263
                Hi,

                What is the site-to-server mapping that you've set? It's not correct that your app gets redirected to port 81...it must lead to port 80 only.

                Regards,
                Priyanka
                Oracle Web Cache Team
                • 5. Re: Web Cache 10g Strange Port Redirection
                  Nikolaj
                  Hi

                  I have one named sites definitions, it is also default named site.

                  Host name is <My Host>
                  Port is 80 (It is that port, which WEB cache is listening)
                  Prefix field is empty.

                  Origin server is <My host>:81 (Actually it is my apache virtual host)

                  As I've written all navigation in my application is performed over one servlet, which recieves request by method post, and uses sendRedirect method to redirect user reuqests (sending http header to browser):

                  response.sendRedirect(url);

                  If I change code, and servlet uses server side redirection request.getRequestDispatcher(url).forward(request, response);

                  App is redirected to WEB Cache (Named Site) port. All navigation works fine with WEB Cache or without it.

                  But this method doesn't suites for my application. Because if user press refresh button, browser asks to repost the data.

                  Best Regards
                  --------------------
                  Nikolajs Sulima

                  Message was edited by:
                  nikolajs.sulima@dati.lv
                  • 6. Re: Web Cache 10g Strange Port Redirection
                    431263
                    Hi,

                    Where have you deployed your application? is it in the server listening on 80? If yes, then the problem lies here.

                    Regards,
                    Priyanka GES
                    Oracle Web Cache Team
                    • 7. Re: Web Cache 10g Strange Port Redirection
                      Nikolaj
                      My application is deployed to OC4J home instance. It is not listening http ports at all.
                      • 8. Re: changing hostnames
                        463884
                        Hi,

                        we have installed the 10g portal and infra on 2 different machines and they are up and running fine. Now we want to move these servers to production but with different host names. Could any one of you please direct me to where to look in the documentation for changing the host names after installation?

                        Ragards
                        Venu G
                        • 9. Re: Web Cache 10g Strange Port Redirection
                          431263
                          OK, what's the OC4J listen port?

                          Regards,
                          Priyanka GES
                          Oracle Web Cache Team
                          • 10. Re: changing hostnames
                            431263
                            Hi Venu,

                            Please post this question in a forum specific to Portal or Infra, because this forum's for Web Cache and you might not get the answer here.

                            Regards,
                            Priyanka GES
                            Oracle Web Cache Team
                            • 11. Re: Web Cache 10g Strange Port Redirection
                              641342
                              Hi,
                              I have this problem. I have an Oracle 10g database and a firewall. I would like to use oracle through my firewall. how can I manage port redirection?
                              some body can help me?
                              thank you
                              Alessia
                              • 12. Re: Web Cache 10g Strange Port Redirection
                                443026
                                Hi,

                                I think, your application is redirecting to URL using the environment setted up by directives ServerName and Port. In your httpd.conf of your origin server create new virtual host with this setup:

                                - Set value for ServerName directive as fqdn of your site
                                - Set value for Port directive ( not Listen ) to 80 (or 443 for the https virtual host)

                                For example:

                                NameVirtualHost IPOfMyHost:81

                                <VirtualHost IPOfMyHost:81>
                                ServerName MySiteFQDN
                                Port 80
                                ...
                                ...