How do I use Sun Web Server 7.0u1 reverse proxy to change public URLs?

Some of our installations use the Sun Web Server 7.0 (update 1, usually)
for hosting some of the public resource and reverse-proxying other parts
of the URI namespace from other backend servers (content, application
and other types of servers).
So far every type of backend server served a unique part of the namespace
and there was no collision of names, and the backend resources were
published in a one-to-one manner. That is, a backend resource like, say,
http://appserver:8080/content/page.html would be published in the internet
as http://www.publicsite.com/content/page.html
I was recently asked to research whether we can rename some parts of
the public URI namespace, to publish some or all resources as, say,
http://www.publicsite.com/data/page.html while using the same backend
resources.
Another quest, possibly related in solution, was to make a tidy url for the
first page the user opens of the site. That is, in the current solution when
a visitor types the url "www.publicsite.com" in his or her browser, our web
server returns an HTTP-302 redirect to the actual first page URL, so the
browser sends a second request (and changes the URL in its location bar).
One customer said that it is not "tidy". They don't want the URL to change
right upon first rendering the page. They want the root page to be rendered
instantly i the first HTTP request.
So far I found that I can't solve these problems. I believe these problems
share a solution because it relies on ability to control the actual URI strings
requested by Sun Web Server from backend servers.
Some details follow, now:
It seems that the reverse proxy (Service fn="service-passthrough") takes
only the $uri value which was originally requested by the browser. I didn't
yet manage to override this value while processing a request, not even if
I "restart" a request. Turning the error log up to "finest" I see that even
when making the "service-passthrough" operation, the Sun Web Server
still remembers that the request was for "/test" (in my test case below);
it does indeed ask the backend server for an URI "/test" and that fails.
[04/Mar/2009:21:45:34] finest (25095) www.publicsite.com: for host xx.xx.xx.83
trying to GET /content/MainPage.html while trying to GET /test, func_exec reports:
fn="service-passthrough" rewrite-host="true" rewrite-location="true"
servers="http://10.16.2.127:8080" Directive="Service" DaemonPool="2b1348"
returned 0 (REQ_PROCEED)My obj.conf file currently has simple clauses like this:
# this causes /content/* to be taken from another (backend) server
NameTrans fn="assign-name" from="/content" name="content-test" nostat="/content"
# this causes requests to site root to be HTTP-redirected to a certain page URI
<If $uri =~ '^/$'>
    NameTrans fn="redirect"
        url="http://www.publicsite.com/content/MainPage.html"
</If>
<Object name="content-test">
### This maps http://public/content/* to http://10.16.2.127:8080/content/*
### Somehow the desired solution should instead map http://public/data/* to http://10.16.2.127:8080/content/*
    Service fn="service-passthrough" rewrite-host="true" rewrite-location="true" servers="http://10.16.2.127:8080"
    Service fn="set-variable" set-srvhdrs="host=www.publicsite.com:80"
</Object>
I have also tried "restart"ing the request like this:
    NameTrans fn="restart" uri="/data"or desperately trying to set the new request uri like this:
    Service fn="set-variable"  uri="/magnoliaPublic/Main.html"Thanks for any ideas (including a statement whether this can be done at all
in some version of Sun Web Server 7.0 or its opensourced siblings) ;)
//Jim

Some of our installations use the Sun Web Server 7.0 (update 1, usually)please plan on installing the latest service pack - 7.0 Update 4. these updates addresses potentially critical bug fixes.
I was recently asked to research whether we can rename some parts of
the public URI namespace, to publish some or all resources as, say,
http://www.publicsite.com/data/page.html while using the same backend
resources.> now, if all the resources are under say /data, then how will you know which pages need to be sent to which back end resources. i guess, you probably meant to check for /data/page.html should go to <back-end>/content/page.html
yes, you could do something like
- edit your corresponding obj.conf (<hostname>-obj.conf or obj.conf depending on your configuration)
<Object name=¨default¨>
<If $uri = ¨/page/¨>
#move this nametrans SAF (for map directive - which is for reverse proxy within <if> clause)
NameTrans.. fn=map
</If
</Object>
and you could do https-<hostname>/bin/reconfig (dynamic reconfiguration) to check out if this is what you wanted. also, you might want to move config/server.xml <log-level> to finest and do your configuration . this way, you would get enough information on what is going on within your server logs.
finally,when you are satisfied, you might have to run the following command to make your manual change into admin config repository.
<install-root>/bin/wadm pull-config user=admin config=<hostname> <hostname>
<install-root>/bin/wadm deploy-config --user=admin <hostname>
you might want to check out this for more info on how you could use <if> else condition to handle your requirement.
http://docs.sun.com/app/docs/doc/820-6599/gdaer?a=view
finally, you might want to refer to this doc - which explains on ws7 request processing overview. this should provide you with some pointers as to what these different directives mean
http://docs.sun.com/app/docs/doc/820-6599/gbysz?a=view
>
One customer said that it is not "tidy". They don't want the URL to change
right upon first rendering the page. They want the root page to be rendered
instantly i the first HTTP request.
please check out the rewrite / restart SAF. this should help you.
http://docs.sun.com/app/docs/doc/820-6599/gdada?a=view
pl. understand that - like with more web servers - ordering of directives is very important within obj.conf. so, you might want to make sure that you verify the obj.conf directive ordering is what you want it to do..
It seems that the reverse proxy (Service fn="service-passthrough") takes
only the $uri value which was originally requested by the browser. I didn't
yet manage to override this value while processing a request, not even if
I "restart" a request. Turning the error log up to "finest" I see that even
when making the "service-passthrough" operation, the Sun Web Server
still remembers that the request was for "/test" (in my test case below);
it does indeed ask the backend server for an URI "/test" and that fails.
now, you are in the totally wrong direction. web server 7 includes a highly integrated reverse proxy solution compared to 6.1. unlike 6.1, you don´t have to download a separate plugin . however, you will need to manually migrate your 6.1 based reverse proxy settings into 7.0. please check out this blog link on how to set up a reverse proxy
http://blogs.sun.com/amit/entry/setting_up_a_reverse_proxy
feel free to post to us if you need any futher help
you are probably better off - starting fresh
- install ws7u4
- use gui or CLI to create a reverse proxy and map one on one - say content
http://docs.sun.com/app/docs/doc/820-6601/create-reverse-proxy-1?a=view
if you don´t plan on using ws7 integrated web container (ability to process jsp/servlet), then you could disable java support as well. this should reduce your server memory footprint
<install-root>/bin/wadm disable-java user=admin config=<hostname>
<install-root>/bin/wadm create-reverse-proxy user=admin uri-prefix=/content server=<http://your back end server/ config=<hostname> --vs=<hostname>
<install-root>/bin/wadm deploy-config --user=admin <hostname>
now, you can check out the regular express processing and <if> syntax from our docs and try it out within <https-<hostname>/config/<hostname>-obj.conf> file and restart the server. pl. note that once you disable java, ws7 admin server creates <vs>-obj.conf and you need to edit this file and not default obj.conf for your changes to be read by server.
>
I have also tried "restart"ing the request like this:
NameTrans fn="restart" uri="/data"
ordering is very important here... you need to do this some thing like
<Object name=default>
<If not $restarted>
NameTrans fn=restart uri from=/¨ uri=/foo.
</If>

Similar Messages

  • Using Sun Web Server 6.1 from the IDE

    Using JSE 8 with Sun Web Server 6.1 set as the target container, I have a SUNWS61deployment.xml file created.
    That didn't exist in JSE 7. Is it WS 6.1 SP4 or SP5 -related ?
    I also have ws61-sun-web.xml with a simple <sun-web-app/> tag (empty deployment descriptor).
    What should this file contain? Is it a replacement for sun-web.xml?
    Do I still need sun-web.xml? Its DTD declaration sounds like Sun
    App Server 7 (http://www.sun.com/software/sunone/appserver/dtds/sun-web-app_2_3-1.dtd)
    So you have plans to make "Sun Resources" (pools, JNDI resources, ...) created in the IDE be registerable directly in the Web Server just like it's possible with the sun app server?
    How safe is it to use JSE 8 with an older Web Server Service Pack (say 6.1SP1)?

    SUNWS61deployment.xml is created bythe IDE to be used internally and not to be used by the developer. This file wouldn't be sent to webserver after deployment.
    The ws61-sun-web.xml is sun-web.xml only and yes it is same as it is in Appserver7 as the webcontainer for both Webserver6.1 and Appserver7 are same. After deployment to webserver, ws61-sun-web.xml is renamed to Webserver as sun-web.xml by the IDE. When opened the developer can edit in the XML editor.
    The reason for having it as ws61-sun-web.xml in IDE is to avoid the clash between sun-web.xml of Appserver8.1 which is J2EE1.4 based whereas Webserver6.1 Web container is J2EE1.3 based.
    It should be okay to use any service pack of Webserver6.1 with JSE8
    Hope this helps

  • Best way to use Sun Web Server connection pooling with Web Application?

    I have a number of applications that run Oracle and MySQL queries via Sun Web Server 6.1. I use the Web Server's built-in connection pooling, which works fairly well.
    As an interface with the connections I receive from the Web Server, I use a class, which (1) accepts the SQL and database name from a tool, (2) Opens the connection, runs the SQL, closes the connection, (3) puts the content of the result set into a Vector of Hashtables, (4) returns that Vector to the tool.
    Why do I use this Vector? That way, in my applications, I don't have to deal with opening connections (or getting them from the pool) and I don't have to worry about closing connections, because that's done automatically by the interface class.
    Is this a dumb approach to use? I'm a bit paranoid about open DB connections, because we have had a number of problems where connections would not be closed, go stale in oracle, and clog up the database resources.
    Can you suggest a better way to (1) smartly control opening and closing connections, and (2) enabling fast database access?
    Sorry, but given this Java/Sun Web Server double topic, I'm going to post the same message on the Web Server board.
    Any tips?
    dailysun
    P.S. For instance, in my tool, I call the interface class in this manner:
    Vector results_v = Database.getSelect("SELECT * FROM TEST","database1");
    getSelect uses the first string as the SQL and the second string as the jndi name of the Web server's database resource. getSelect does all the context stuff to get a connection from the pool, runs the SQL, puts the resultset into a Vector of Hastables (where each row is one Hashtable), and returns the Vector.

    I have a number of applications that run Oracle and MySQL queries via Sun Web Server 6.1. I use the Web Server's built-in connection pooling, which works fairly well.
    As an interface with the connections I receive from the Web Server, I use a class, which (1) accepts the SQL and database name from a tool, (2) Opens the connection, runs the SQL, closes the connection, (3) puts the content of the result set into a Vector of Hashtables, (4) returns that Vector to the tool.
    Why do I use this Vector? That way, in my applications, I don't have to deal with opening connections (or getting them from the pool) and I don't have to worry about closing connections, because that's done automatically by the interface class.
    Is this a dumb approach to use? I'm a bit paranoid about open DB connections, because we have had a number of problems where connections would not be closed, go stale in oracle, and clog up the database resources.
    Can you suggest a better way to (1) smartly control opening and closing connections, and (2) enabling fast database access?
    Sorry, but given this Java/Sun Web Server double topic, I'm going to post the same message on the Web Server board.
    Any tips?
    dailysun
    P.S. For instance, in my tool, I call the interface class in this manner:
    Vector results_v = Database.getSelect("SELECT * FROM TEST","database1");
    getSelect uses the first string as the SQL and the second string as the jndi name of the Web server's database resource. getSelect does all the context stuff to get a connection from the pool, runs the SQL, puts the resultset into a Vector of Hastables (where each row is one Hashtable), and returns the Vector.

  • Replace Quotes, Connection Pooling, and Sun Web Server with MySQL, Oracle

    This is code I use to insert data into my MySQL and Oracle databases.
    I takes care of quotes and shows use of context, i.e. when you use Sun Web Server's
    ConnectionPooling. This code works. Feel free to reply if you have questions on how to set up connection pooling using Sun Web Server 6.1SP - it took quite a long time to learn and I couldn't find much information throughout the web, so I hope this helps...
    This is not a question and I am not looking for an answer, but please post comments or suggestions.
    dailysun
    This is in one class where I have a hashtable containing the
    column name / value pairs that I want to enter into my table.
    This class simply creates the SQL string from the values in the
    hashtable. It then passes that hashtable including the database
    name to a class which executes that sql statement (second code
    portion).
    /* Insert data into sf_parts. Create the column strings from
             * the provided hash table. Be sure to parse out hash elements which
             * are used for the createTemplate process
            StringBuffer values = new StringBuffer();
            StringBuffer fields = new StringBuffer();
            Enumeration keys = fieldHash.keys();
            while(keys.hasMoreElements()){
                Object currentKey = keys.nextElement();
                    String fieldValue = (String) fieldHash.get(currentKey);
                    if(values.length() >0){
                        values.append(",");
                    values.append("'"+fieldValue.replaceAll("'","''")+"'"); // Takes care of quotes and various other special characters!
                    if(fields.length() >0){
                        fields.append(",");
                    fields.append(currentKey);
            sql = "INSERT INTO myTable (" + fields.toString() + ") VALUES (" + values.toString() + ");";
            String insertResult = caq.getInsertDelete(sql,"myDatabaseName"); // your database name is defined in web.xml and sun-web.xml when you use Sun Web Server's Connection Pooling.
            returnValue += "<br><br><b>Rows inserted into table(myTable): </b>" + insertResult + "<br>\n";
            And, like I describe above, this method executes the sql statement.
         * Takes care of insert, update and delete requests.
         * Must have set both dbName as well as the sql String.
         * Will return number of rows affected as String.
         * @return String Number of rows affected
         * @exception SQLException
         * @exception Exception
        public String getInsertDelete() {
            checkData(); // this simply checks if the variables dbName and sql are not empty ;-)
            InitialContext initContext = null;
            int rv = 0;
            try{
                // Get connection from configured pool
                initContext = new InitialContext();
                source = (DataSource) initContext.lookup("java:comp/env/jdbc/" + dbName); // I have this set up in web.xml and sun-web.xml (I use Sun Web Server 6.1SP which does connection pooling for me)
                conn = source.getConnection();
                if(conn != null){
                    stmt = conn.createStatement();
                    rv = stmt.executeUpdate(sql);
            }catch (SQLException e){
                // do something
            }catch (Exception e){
                // do something
            }finally{
                try{
                    stmt.close();
                }catch(Exception e){
                    // do something
                try{
                    conn.close();
                }catch(Exception e){
                    // do something
                try{
                    initContext.close();
                }catch(Exception e){
                    // do something
            return rv+"";
        }  

    This is code I use to insert data into my MySQL and
    Oracle databases.
    I takes care of quotes and shows use of context, i.e.
    when you use Sun Web Server's
    ConnectionPooling. This code works. Feel free to
    reply if you have questions on how to set up
    connection pooling using Sun Web Server 6.1SP - it
    took quite a long time to learn and I couldn't find
    much information throughout the web, so I hope this
    helps...
    This is not a question and I am not looking for an
    answer, but please post comments or suggestions.Using prepared statements would mean that you wouldn't have to worry about quotes.
    You should be closing the result set.
    You are handling all fields as strings. That won't work with time fields and might not work for numeric fields.
    Presumably most of your variables are member variables. They should be local variables because that is the scope of the usage.
    You must do something with the exceptions.
    Hashtables although convienent mean that problems with usage can only be resolved at run time rather than compile time.

  • Annoucing a few complimentary copies of Sun Web Server: Essentials Guide

    Dear Sun Web Server user,
    As you may have heard, found it on amazon.com or stumbled on it in the local book store like Borders or Barnes & Noble, there is a new book on Sun Web Server technology. If you haven't, no worries. Please refer to [t-5406033] or visit the [Essential Guide's web site|http://www.sunwebserver.com/].
    We are now pleased to announce availability of a few complimentary copies of the Essential Guide. We'll be raffling away the copies in the next few months. If you are interested in a free copy of the book, please read further to enter the raffle.
    It's easy to enter the raffle and get started:
    Step 1: If you haven't already done so, download, install and register.
    Step 2: Write a review of Sun Web Server product on Web Server's official page [1], and
    Step 3: Send us an email webserver at sun dot com, confirming your Step 1 along with a link to your review (Step 2).
    What happens next?
    We'll raffle at least a copy once in a month and the winner(s) will be notified. With may share the raffle results on with a permission from the lucky winners. If you are interested, get started today!
    [1] [Sun Web Server's official page|http://www.sun.com/webserver/].
    Disclaimer: Please note that the raffle is organized by the author(s), and that Sun Microsystems or Pearson Media - the publishers of The Essential Guide - are not responsible for the raffle.

    Hi mv,
    I probably mis-spoke. It is not so much the features that are missing in Sun Web Server, as it is the availability of additional user plugins. However, that being said, I chose Sun Web Server over Apache because of security and performance. I realize additional plugins could adversely affect both of those. I have emailed Sun marketing about a specific feature for Web Dav I would like to see. This would make things much easier for people who would like to do mass hosting virtual hosting. Most of the real valuable features that gave Apache an edge, the web server team has added in version 7. I have pasted a portion of the letter I emailed to Sun marketing below about Web Dav, and my logic behind it. This as well as being able to hook the user system into standard open source databases makes for a broader solution appeal. I realize I only have one view of the market, and these are just my two cents. :-) Thanks!
    TonyZ
    **** Letter ******
    I was introduced to Sun Web Server several years ago when we began looking at moving servers away from Microsoft technology and also bringing them into our facility. As a network and sys admin, I evaluated using different web servers out there as we had a few years to work on this project to ensure uptime and reliability. Initially, I found Sun Web Server quite confusing and looked at Apache. However, after the web interface was retooled, I found Sun Web Server quite simple and refreshing to use. Since we have to be CISP compliant for the credit card industry, security was very important to us. Not only from a code standpoint, but also from an accidental misconfiguration standpoint. In my opinion, Sun Web Server out shines Apache and other alternatives by a long shot.
    As far as the WebDav feature, what I have been looking at is how to expand and offer hosting and web services. I currently work for a small company which retails products on the web, and I also contribute to a few open source projects. Currently, I am working with http://www.mynajs.org/. We have been discussing how we could offer hosting for people wanting to try out the project. Hosting companies using Linux typically have deep hooks into the Linux operating system for managing users. For hosting, you have a whole specialized Linux stack with specialized disk quotas, users, ftp server with users based on Linux users, and mail. From my standpoint, while this works, it can become a nightmare as far as updates, system administration, patching, etc. For a business ROI, and technology footprint, this doesn't make sense. There are control panels out there that take care of some of this, but now you have another whole layer of technology to troubleshoot. If I do not want to use the Linux/Apache stack, and if I am using Java, and do not want to add Tomcat as well, what do I use? With Sun Web Server, I get the best of both worlds, one install, one piece of software, operating system separation, blazingly fast speed, out of the box clustering, one interface for management, standard serving as well as Java, and WebDav so that now I can eliminate an ftp server and reduce my footprint for security and maintenance headaches. One neat package. However, now I still have to manage and restrict users. How to do this using Sun Web Server? Right now, I have to either run an ftp server with quotas built in, or go back to the Linux operating system and work with specialized scripts an maintenance. In theory, if Sun Web Server had quotas, I have my user system with the controls I need. At the very least, if there were hooks to the WebDav system to perform custom processing on certain events, it would leave the door open for greater control of the user and system. Now if we want to offer a hosting solution, whether it be online storage, web hosting, or Java hosting, or social site, all we need is one product, Sun Web Server! With all of its features for enhancing performance, security, and much more. I might also add, that for a small companies, Sun Web Server has been a pretty much set it and forget it solution. It has been my experience for our servers to run pretty much without intervention once they are setup. With the watch dog process, if there is a problem, it is rarely noticed except for the admin watching the logs. Technically, I am not sure why anyone would choose something different than Sun Web Server. Apache is the hosting standard, but it is really Apache plus Linux. With a few more user features, I think Sun Web Server could replace the whole Apache/Linux stack, the Apache/Linux/Tomcat stack, outshine those solutions on heavy loads and high end features, and offer better ROI.

  • How to do auto URL redirect in sun web server ?

    Hi, i need to do auto url redirect in my sun web server. Currently i'm setup some rules for the reverse proxy in obj.conf file and the syntax looks like:
    <Object name="reverse-proxy-/test">
    <If $internal and $uri =~ "index.html">
    NameTrans fn="redirect" from="/" uri="/examples/abc.html"
    </If>
    Route fn="set-origin-server" server="http://localhost:8989"
    </Object>
    The situation is:
    1) When users browse "*http://localhost/examples/abc.html*" it will redirect to abc.html
    2) When users browse "*http://localhost/test*" it will redirect to the localhost admin GUI (http://localhost:8989/admingui/admingui/serverTaskGeneral)
    My desire output should be whenever users browse the "*http://localhost/test*" , it will redirect to abc.html page.
    the syntax might be wrong. So, anyone knows how to fix this? I'm keep trying but nothing worked. Please help me.

    Moderator action: Moved from Servers General Discussion.
    db

  • SUN Java System Web Server 7.0U1 How to install certificate chain

    I am trying to install a certificate chain using the SUN Java Web Server 7.0U1 HTTPS User interface. What I have tried so far:
    1. Created a single file using vi editor containing the four certificates in the chain by cutting an pasting each certificate (Begin Certificate ... End Certificate) where the top certificate is the server cert (associated with the private key), then the CA that signed the server cert, then the next CA, then the root CA. Call this file cert_chain.pem
    2. Go to Certificates Tab/Server Certificates
    3. Choose Install
    4. Cut and paste contents of cert_chain.pem in the certificate data box.
    5. Assign to httplistener
    6. Nickname for this chain is 'server_cert'
    7. Select httplistener and assign server_cert (for some reason, this is not automatically done after doing step 5).
    8. No errors are received.
    When I display server_cert (by clicking on it), only the first certificate of the chain is displayed and only that cert is provided to the client during the SSL handshake.
    I tried to do the same, except using the Certificate Authority Tab, since this gave the option of designating the certificate as a CA or chain during installation. When I select ed "chain," I get the same results when I review the certificate (only the first cert in the file is displayed). This tells me that entering the chain in PEM format is not acceptable. I tried this method since it worked fine with the F5 BIG-IP SSL appliance.
    My question is what format/tool do I need to use to create a certificate chain that the Web Server will accept?

    turrie wrote:
    1. Created a single file using vi editor containing the four certificates in the chain by cutting an pasting each certificate (Begin Certificate ... End Certificate) where the top certificate is the server cert (associated with the private key), then the CA that signed the server cert, then the next CA, then the root CA. Call this file cert_chain.pemIn my opinion (I may be wrong) cut and pasting multiple begin end
    --- BEGIN CERTIFICATE ---
    ... some data....
    --- END CERTIFICATE ---
    --- BEGIN CERTIFICATE ---
    ... some data....
    --- END CERTIFICATE ---is NOT the way to create a certificate chain.
    I have installed a certificated chain (it had 1 BEGIN CERTIFICATE and one END CERTIFICATE only and still had 2 certificates) and I used the same steps as you mentioned and it installed both the certificates.
    some links :
    [https://developer.mozilla.org/en/NSS_Certificate_Download_Specification|https://developer.mozilla.org/en/NSS_Certificate_Download_Specification]
    [https://wiki.mozilla.org/CA:Certificate_Download_Specification|https://wiki.mozilla.org/CA:Certificate_Download_Specification]

  • How to use the web server tips (connected/disconnected)?

    Using the web server tips into a VI to know when a client is connected or disconnected.
    Hello Everyone
    I want to use the tips that appear when a remote user gets control of my VI via web server. That way I will be able to trigger some other operations as soon as the user gets in or out my VI. How can I extract the information that contains that (user has or has not control). I hope you can help me.
    Regards
    Marco Roman

    There is a VI method called Remote Panel Client Connections. It returns an array of clusters with connection information and also has a Controller output. If the controller output is -1, no clients are connected.

  • How to use Apache Web Server?

    Hi all,
    How to use Apache Web Server?
    Thanks
    contact me: [email protected]

    i do not know for certain about the jsps you're talking about, but i would guess they should run just fine under jrun, and you wouldn't have to make jrun and jserv coexist.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by One:
    Hi ilya:
    Thank you for your quick reply.
    I will try that way but I wonder if the thing like "how about the *.jsp developed by the JDeveloper and BC4J run under JRun; could and is it necessary to make the Apache+JServ and Apache+JRun co-exist ... "<HR></BLOCKQUOTE>
    null

  • Need help with URL Redirect in Sun Web Server 7 u5

    All I am trying to do is redirect to a static URL and for the life of me I can not get it to behave the way I would expect. I am new to Sun Web Server so I am just trying to use the Admin Console to set this up.
    Here is what I'm trying to do:
    Redirect from - http://www.oldsite.com/store/store.html?store_id=2154
    To - http://www.newsite.com/Stores/StoreFront.aspx?StoreId=2154
    Here's what I tried in the console.
    Added a new URL Redirect
    Set the Source to be Condition and set it to: '^/store_id=2154$' (quotes included)
    Then set the Target to: http://www.newsite.com/Stores/StoreFront.aspx?StoreId=2154
    Then for the URL Type I checked Fixed URL
    When I tested with: http://www.oldsite.com/store/store.html?store_id=2154 it did redirect as desired
    BUT
    When I tested with: "http://www.oldsite.com/store/store.html?store_id=5555" it too got redirected to the Target and I can't figure out how this second URL can satisfy the condition to get redirected.
    Any help is most appreciated.

    thanks for choosing sun web server 7
    it is simpler if you just edit the configuration files manually
    cd <ws7-install-root>/https-<hostname>/config/
    edit obj.conf or <hostname>-obj.conf (if there is one for you depending on your configuration so that it look something like)
    <Object name="default">
    AuthTrans..
    #add the folllowing line here
    <If defined $query>
    <If $urlhost =~ "/oldsite.com" and
    $uri =~ "/store/store.html" and
    $query =~ "store_id=2154" >
    NameTrans fn="redirect" from="/" http://www.newsite.com/Stores/StoreFront.aspx?StoreId=2154
    </If>
    </If>
    ..rest of the existing obj.conf. continues
    NameTrans...
    now, you can either do <ws7-install-root>/https-<hostname>/bin/reconfig -> to reload your configuration without any server downtime or <ws7-install-root>/https-<hostname>/bin/restart -> to restart the server
    if it did work out for your, you will need to run the following so that admin server is aware of what you just did
    <ws7-install-root>/bin/wadm pull-config user=admin config=<hostname> <hostname.domainname>
    hope this helps

  • How do you failover the web server?

    I have 2 servers running the web server on them. If one of them fails how do I reroute the users requests to the other one, seamlessly to the user? I am new to using the web server so any help, even remedial would help!! Thanks!

    Ya, thats part of the problem. Right now we are using Sun Cluster to provide a network resource that handles which web server is to handle the request. A virtual ip address so to speak. We'd like to stop using Sun Cluster as it's a bit unstable, ie reboots the cluster randomly without error messages or warnings. We'd like to just use the web server/application server clustering capabilities and eleviate the extra layer of complexity with Sun Cluster. I know Sun Cluster has a Web Server agent to do this, but that is why we're trying to not go down that road. It is starting to sound like we may have to though as buying additional hardware isn't an option.

  • ACE rewrite embedded URL (Sun Web Server)

    I'm using the ACE to perform SSL offload infront of the servers. That is, clients talk 443, backend servers are 80.
    Is it possible to rewrite the URL's embedded withing a web page (inside javascript I think too) that is being generated by the server as http. I have gotten URL rewrite going, and it changes the 302 redirect, but not other URL in the payload.
    If not, is there a way to tell the Sun web server that it is being offloaded, and to generate https urls on port 80?
    (Server is Sun Messaging Suite Sun-Java-System-Web-Server/7.0)
    Regards,

    Not possible to change the embedded url on ACE.
    Unfortunately, I have no idea how to configure the Sun device.
    G.

  • How do I get Apache web server working ...

    How do I get Apache web server working on my MacBook Pro, which is running Leopard 10.5.8?
    When I enter 'http://localhost/~username/' (without the quote marks) as a URL in my Firefox browser on the MacBook, I do not see any result at all(!). I do have Web Sharing on in System Preferences on that machine. But the browser does nothing whatever for that URL ...
    On my other computer, an iMac running Leopard 10.5.8, when I enter 'http://localhost/~username/' I see the default "Your Website Here" page. That same default page is in fact the index.html file I expect to see on the MacBook Pro. But it isn't getting invoked for some reason. Nothing is happening ...
    When on the iMac I try 'http://10.0.1.18/~username/' (10.0.1.18 is the local IP address I see under 'Web Sharing: On' on the MacBook) I get "Unable to connect: Firefox can't establish a connection to the server at 10.0.1.18."
    When on the MacBook I try 'http://10.0.1.5/~username/' (10.0.1.5 is the local IP address I see under 'Web Sharing: On' on the MacBook) I see the default "Your Website Here" page.
    It is the same on my iPhone: Using the same local IP addresses and usernames, Safari can see the index.html page on my iMac but not on my MacBook.
    It looks as if Apache is not working on the MacBook, while on the iMac it works fine.
    On the MacBook I can see (after I use 'defaults write com.apple.finder AppleShowAllFiles TRUE' in Terminal) a /private/etc/apache2/ directory with what look to be(?) the usual contents. So it looks like Apache is duly installed, as far as I can tell.
    On the MacBook I don't see a file at /private/var/log/apache2/error_log, which is the location for 'ErrorLog' given in the httpd.conf file.
    That about exhausts my understanding of how to get a handle on my problem.
    Any advice or suggestions from those who have more expertise with Apache will be much appreciated ...

    Okai, so we are getting somewhere, but not quit there yet :-)
    I opened the Kenneth.conf file using the command: vi Kenneth.conf
    This is what it said:
    <Directory "/Users/Kenneth/Sites/">
    Options Indexes Multiviews
    AllowOverride AuthConfig Limit
    Order allow,deny
    Allow from all
    </Directory>
    "Kenneth.conf" [readonly] 6L, 139C
    I therefore changed the AllowOverride from AuthConfig Limit to None, which was the only difference from what you posted above. Something did change, when I tried to open XAMPP it prompted me a password, but Apache still wont start :-/

  • Error message when deploying war file to sun web server 6.1

    i've been trying to deploy an application developed locally in tomcat to a local install of sun web server 6.1, and can't seem to get it to work. the error message i am getting now is:
    [05/Dec/2008:12:44:08] config ( 1640): for host xxx.xxx.xxx.xx trying to GET /cart/index.jsp, handle-processed reports: HTTP2205: The request method is not applicable to the requested resource.
    but that is the only error showing up. i've found some other forum topics involving memory issues (not the case here) and mime.type issues (not the case here), but nothing where this is the only error message showing up.
    any ideas? anyone?

    I deployed the application using a WAR file I created and the Server Manager.
    I've been able to get a JSP running in the $INSTALL_DIR/docs directory (database connectivity, result set printing, session data storing) but not outside of there.
    I switched to "finest" error reporting, but that isn't really helping much either.
    I even deployed one of the sample WAR files that came with the installation (webapps-simple.war), and it failed too, the error message I got was:
    [09/Dec/2008:10:35:51] fine ( 5384): for host 192.168.112.96 trying to GET /simple/jsp/num/numguess.jsp, ntrans-j2ee reports: mapped uri "/jsp/num/numguess.jsp" in context "/simple" to resource "jsp"
    [09/Dec/2008:10:35:51] fine ( 5384): for host 192.168.112.96 trying to GET /simple/jsp/num/numguess.jsp, service-j2ee reports: context = StandardEngine[null].StandardHost[https-arlll3n4244.arcds.com].StandardContext[simple]
    [09/Dec/2008:10:35:51] fine ( 5384): for host 192.168.112.96 trying to GET /simple/jsp/num/numguess.jsp, service-j2ee reports: contextPath = /simple
    [09/Dec/2008:10:35:51] fine ( 5384): for host 192.168.112.96 trying to GET /simple/jsp/num/numguess.jsp, service-j2ee reports: wrapper = null
    [09/Dec/2008:10:35:51] fine ( 5384): for host 192.168.112.96 trying to GET /simple/jsp/num/numguess.jsp, service-j2ee reports: servletPath =
    [09/Dec/2008:10:35:51] fine ( 5384): for host 192.168.112.96 trying to GET /simple/jsp/num/numguess.jsp, service-j2ee reports: pathInfo = null
    [09/Dec/2008:10:35:51] finer ( 5384): for host 192.168.112.96 trying to GET /simple/jsp/num/numguess.jsp, service-j2ee reports: Authenticator[simple]: Security checking request GET /simple/jsp/num/numguess.jsp
    [09/Dec/2008:10:35:51] finer ( 5384): for host 192.168.112.96 trying to GET /simple/jsp/num/numguess.jsp, service-j2ee reports: Authenticator[simple]: Checking constraint 'SecurityConstraint[Protected Area]' against GET /jsp/num/numguess.jsp --> false
    [09/Dec/2008:10:35:51] finer ( 5384): for host 192.168.112.96 trying to GET /simple/jsp/num/numguess.jsp, service-j2ee reports: Authenticator[simple]: No applicable constraint located
    [09/Dec/2008:10:35:51] finer ( 5384): for host 192.168.112.96 trying to GET /simple/jsp/num/numguess.jsp, service-j2ee reports: Authenticator[simple]: Not subject to any constraint
    [09/Dec/2008:10:35:51] finer ( 5384): for host 192.168.112.96 trying to GET /simple/jsp/num/numguess.jsp, service-j2ee reports: WebModule[simple]: Mapping contextPath='/simple' with requestURI='/simple/jsp/num/numguess.jsp' and relativeURI='/jsp/num/numguess.jsp'
    [09/Dec/2008:10:35:51] finer ( 5384): for host 192.168.112.96 trying to GET /simple/jsp/num/numguess.jsp, service-j2ee reports: WebModule[simple]: Decoded relativeURI='/jsp/num/numguess.jsp'
    [09/Dec/2008:10:35:51] finer ( 5384): for host 192.168.112.96 trying to GET /simple/jsp/num/numguess.jsp, service-j2ee reports: WebModule[simple]: Trying exact match
    [09/Dec/2008:10:35:51] finer ( 5384): for host 192.168.112.96 trying to GET /simple/jsp/num/numguess.jsp, service-j2ee reports: WebModule[simple]: Trying prefix match
    [09/Dec/2008:10:35:51] finer ( 5384): for host 192.168.112.96 trying to GET /simple/jsp/num/numguess.jsp, service-j2ee reports: WebModule[simple]: Trying extension match
    [09/Dec/2008:10:35:51] finer ( 5384): for host 192.168.112.96 trying to GET /simple/jsp/num/numguess.jsp, service-j2ee reports: WebModule[simple]: Mapped to servlet 'jsp' with servlet path '/jsp/num/numguess.jsp' and path info 'null' and update=true
    [09/Dec/2008:10:35:51] info ( 5384): for host 192.168.112.96 trying to GET /simple/jsp/num/numguess.jsp, service-j2ee reports: WEB2798: [cart/] ServletContext.log(): JspEngine --> /jsp/num/numguess.jsp
    [09/Dec/2008:10:35:51] info ( 5384): for host 192.168.112.96 trying to GET /simple/jsp/num/numguess.jsp, service-j2ee reports: WEB2798: [cart/] ServletContext.log(): ServletPath: /jsp/num/numguess.jsp
    [09/Dec/2008:10:35:51] info ( 5384): for host 192.168.112.96 trying to GET /simple/jsp/num/numguess.jsp, service-j2ee reports: WEB2798: [cart/] ServletContext.log(): PathInfo: null
    [09/Dec/2008:10:35:51] info ( 5384): for host 192.168.112.96 trying to GET /simple/jsp/num/numguess.jsp, service-j2ee reports: WEB2798: [cart/] ServletContext.log(): RealPath: C:\Sun\WebServer6.1\https-ARLLL3N4244.arcds.com\webapps\https-ARLLL3N4244.arcds.com\simple\jsp\num\numguess.jsp
    [09/Dec/2008:10:35:51] info ( 5384): for host 192.168.112.96 trying to GET /simple/jsp/num/numguess.jsp, service-j2ee reports: WEB2798: [cart/] ServletContext.log(): RequestURI: /simple/jsp/num/numguess.jsp
    [09/Dec/2008:10:35:51] info ( 5384): for host 192.168.112.96 trying to GET /simple/jsp/num/numguess.jsp, service-j2ee reports: WEB2798: [cart/] ServletContext.log(): QueryString: null
    [09/Dec/2008:10:35:51] failure ( 5384): for host 192.168.112.96 trying to GET /simple/jsp/num/numguess.jsp, service-j2ee reports: StandardWrapperValve[jsp]: WEB2792: Servlet.service() for servlet jsp threw exception
    java.lang.IllegalArgumentException: WEB3446: setAttribute: Non-serializable attribute
         at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1280)
         at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:191)
         at org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:191)
         at org.apache.jasper.runtime.PageContextImpl.setAttribute(PageContextImpl.java:271)
         at jsps.jsp._num._numguess_jsp._jspService(_numguess_jsp.java:81)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:688)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:460)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:376)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
         at com.iplanet.ias.web.WebContainer.service(WebContainer.java:579)

  • Deploying an ear file in Sun Web Server

    I have an ear file that we use to deploy to weblogic. Is it possible to deploy an ear file to Sun WEb Server 6.0? Instead of deploying the war files one-by-one?
    If yes, what are the steps?
    Thanks.
    Beth

    No, Sun ONE Web Server does not support ear files; ear files are typically the domain of J2EE application servers.

Maybe you are looking for

  • Authorisation of Purchase order

    Dear All, I want to restrict creation of Purchase order for  a paricular Companny code , Paticular Purchase organisation, purchase group and PO Doic type with  users. EgI have 4 PO Doc types, 2 Company codes, 2 Purchase orgnisations, 6 purchase group

  • Satellite R630 - No Fullscren on TV

    Hey, i tried to connect my Notebook with my TV with an HDMI-Wire, but I can't get a Fullscreen in the TV - there is a Black Frame around the Picture....anybody can help Please!!! thx a lot!!!

  • This phone is not responding

    I am on a screen that has a picture of a iTunes icon and it shows the conector cord trying to conect to the iTunes icon but when I go on iTunes the only option that it show is to restore the iPhone to default.Is there ANYWAY around destroying the dat

  • 5.0.2 Missing MPEG codecs?

    Hello All, The Adobe Updater just automatically updated Premiere CS5 to 5.0.2 and now I don't have any of the MPEG based codecs in my sequence presets. No AVCHD, no XD cam, nothing. Anybody else seen this, and how do you suppose one goes about regain

  • Kernel sources problem

    Hi again. I've tried last night to compile the "stock" kernel-2.6.18-ARCH provided with the distro (and updated to the latest package) so I can customize it the way I like it.  But I've run into a compilation problem after menuconfig. When I run make