Problem with mod_rewrite

I have been trying to work on mod_rewrite for our site. I did get some VERY good help on the mod_rewrite forum but now I am hitting a wall trying to use the [P,L] condition on my Xserve. ( [L] alone works)
Here is my issue from the other forum: http://forum.modrewrite.com/viewtopic.php?t=1554
#In other words, my RewriteRule works as:
RewriteRule ^/?$ http://YOUR-DOMAIN:8080/dspace/index.jsp [L]
#but not as:
RewriteRule ^/?$ http://YOUR-DOMAIN:8080/dspace/index.jsp [P,L]
I think it has something to do with with the modules and I see libproxy.so but don't know what this does.
I was directed on the mod_rewrite forum to use modproxyhttp.so but don't see a similar line to uncomment in my httpd.conf file.
I am sure that I am missing something obvious but do not know what it is.
Thanks for the help,
Gene
Xserve, Powerbook G4   Mac OS X (10.4.6)  

OK, checked and the proxy_module is turned on.
I am not sure about checking the URL. I have only been able to connect as localhost (but never out and back in). I am at work now so I moved on to suggestion three.
Error logs - (Tried both [L,P] and [P,L]
#RewriteRule ^/?$ http://YOUR-DOMAIN:8080/dspace/index.jsp [L,P]
[Fri Apr 28 10:23:55 2006] [notice] SIGHUP received. Attempting to restart
Processing config directory: /etc/httpd/sites/*.conf
Processing config file: /etc/httpd/sites/0000any_80YOUR-DOMAIN.org.conf
Processing config file: /etc/httpd/sites/virtualhostglobal.conf
[Fri Apr 28 10:23:55 2006] [notice] Apache/1.3.33 (Darwin) mod_ssl/2.8.24 OpenSSL/0.9.7i PHP/4.4.1 mod_perl/1.29 configured -- resuming normal operations
[Fri Apr 28 10:23:55 2006] [notice] Accept mutex: flock (Default: flock)
[Fri Apr 28 10:24:19 2006] [error] [client 192.168.1.10] (61)Connection refused: proxy connect to 24.172.122.193 port 8080 failed
#Changed to RewriteRule ^/?$ http://YOUR-DOMAIN:8080/dspace/index.jsp [P,L]
[Fri Apr 28 10:26:16 2006] [notice] SIGHUP received. Attempting to restart
Processing config directory: /etc/httpd/sites/*.conf
Processing config file: /etc/httpd/sites/0000any_80YOUR-DOMAIN.conf
Processing config file: /etc/httpd/sites/virtualhostglobal.conf
[Fri Apr 28 10:26:16 2006] [notice] Apache/1.3.33 (Darwin) mod_ssl/2.8.24 OpenSSL/0.9.7i PHP/4.4.1 mod_perl/1.29 configured -- resuming normal operations
[Fri Apr 28 10:26:16 2006] [notice] Accept mutex: flock (Default: flock)
[Fri Apr 28 10:26:32 2006] [error] [client 192.168.1.10] (61)Connection refused: proxy connect to 24.172.122.193 port 8080 failed
#and back to RewriteRule ^/?$ http://YOUR-DOMAIN:8080/dspace/index.jsp [L]
[Fri Apr 28 10:27:41 2006] [notice] SIGHUP received. Attempting to restart
Processing config directory: /etc/httpd/sites/*.conf
Processing config file: /etc/httpd/sites/0000any_80YOUR-DOMAIN.org.conf
Processing config file: /etc/httpd/sites/virtualhostglobal.conf
[Fri Apr 28 10:27:41 2006] [notice] Apache/1.3.33 (Darwin) mod_ssl/2.8.24 OpenSSL/0.9.7i PHP/4.4.1 mod_perl/1.29 configured -- resuming normal operations
[Fri Apr 28 10:27:41 2006] [notice] Accept mutex: flock (Default: flock)
Thanks again!
G
Xserve, Powerbook G4 Mac OS X (10.4.6)

Similar Messages

  • [Apache] Problem with Mod_rewrite

    Hi,
    when I try to use mod_rewrite on my localhost, it won't run. Simple rules like ^index.html$ index.php [L] return me a 404-Error. I read somewhere in the forums about "AllowOverride" and set it to all, but i didn't improve anything. Does someone know how to fix that?
    --- EDIT ---
    Needed some RewriteBase
    Last edited by Skittles (2008-02-23 18:01:38)

    wandrian wrote:
    Just as reference for other people coming in this page. There is a solution setting correctly AllowOverride on the chosen directory in /etc/httpd/conf/httpd.conf
    I found the solution in this thread:
    http://bbs.archlinux.org/viewtopic.php?id=41606
    Cheers
    Also
    Make sure you have the AllowOverride directive in in a directory container as follows:
    <Directory /path/to/your/documentroot/>
    ...other stuff you might have in here ...
    AllowOveride ALL
    </Directory>
    If the directive is not ALL then your .htaccess file may not be read: see:
    http://httpd.apache.org/docs/2.1/mod/co … owoverride
    P.S do not change the "AllowOverride None" directive in <Directory /> section of httpd.conf
    If you still have problems you may wish to check that the AccessFileName directive (if present) in /etc/httpd/conf/httpd.conf reads:
    AccessFileName .htaccess
    see:
    http://httpd.apache.org/docs/2.1/mod/co … ssfilename
    I learnt this the hard way. Hope this helps others.
    emk

  • Problems with mod_rewrite

    My scenario is:
    I would like to have this URL:
    http://myhostname:7778/pls/apex/f?......
    Accessible by typing this URL:
    http://myhostname/operations
    I've been successful at simplifying the URL by using Frames,
    But I was not able to eliminate the need to type in the Port Number.
    I think I need to use the MOD_REWRITE module.
    According to my httpd.conf file, the module is loaded: (See Below)
    # Loading mod_rewrite module here as it has to load before mod_oc4j
    LoadModule rewrite_module libexec/mod_rewrite.so
    The ReWrite rules and Conditions I am using are shown here:(See Below)
    <VirtualHost *:7890>
    ServerName MyHostname.bu.edu
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^.*operations$ [NC]
    RewriteRule ^/operations $ http://MyHostname:7778/pls/apex/f?p=113:701 [R]
    # ProxyPass ^/operations http://MyHostname:7778/pls/apex/f?p=113:701 [P]
    DocumentRoot "/oracle6/app/oracle/product/10.1.2as/Apache/Apache/htdocs/operations"
    ServerAlias MyHostname
    </VirtualHost>
    FYI.
    You can see that I've also considered ProxyPass, But I think I've decided that use of the MOD_REWRITE is what I actually want.
    Please feel free to comment on this decision.
    My questions are:
    1. Is my RewriteCOND written correctly
    2. is my RewriteRULE written correctly
    3. Is there anything else I'm forgetting to do.
    * Is there a way to insure that rewrite module is really loaded and configured correctly?
    Any help you can provide is greatly appreciated.
    Thanks- Gary
    Edited by: garyNboston on Dec 16, 2008 8:23 AM

    My scenario is:
    I would like to have this URL:
    http://myhostname:7778/pls/apex/f?......
    Accessible by typing this URL:
    http://myhostname/operations
    I've been successful at simplifying the URL by using Frames,
    But I was not able to eliminate the need to type in the Port Number.
    I think I need to use the MOD_REWRITE module.
    According to my httpd.conf file, the module is loaded: (See Below)
    # Loading mod_rewrite module here as it has to load before mod_oc4j
    LoadModule rewrite_module libexec/mod_rewrite.so
    The ReWrite rules and Conditions I am using are shown here:(See Below)
    <VirtualHost *:7890>
    ServerName MyHostname.bu.edu
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^.*operations$ [NC]
    RewriteRule ^/operations $ http://MyHostname:7778/pls/apex/f?p=113:701 [R]
    # ProxyPass ^/operations http://MyHostname:7778/pls/apex/f?p=113:701 [P]
    DocumentRoot "/oracle6/app/oracle/product/10.1.2as/Apache/Apache/htdocs/operations"
    ServerAlias MyHostname
    </VirtualHost>
    FYI.
    You can see that I've also considered ProxyPass, But I think I've decided that use of the MOD_REWRITE is what I actually want.
    Please feel free to comment on this decision.
    My questions are:
    1. Is my RewriteCOND written correctly
    2. is my RewriteRULE written correctly
    3. Is there anything else I'm forgetting to do.
    * Is there a way to insure that rewrite module is really loaded and configured correctly?
    Any help you can provide is greatly appreciated.
    Thanks- Gary
    Edited by: garyNboston on Dec 16, 2008 8:23 AM

  • Mod_jk in combination with mod_rewrite

    My question is wtf doesn't this work?
    I'm using apache 1.3.27 and jboss-3.0.4_tomcat-4.1.12
    mod_jk works fine. I tried adding in mod_rewrite and now when I go to a page that gets rewritten, the mod_jk doesn't SEE the new URI. Instead, it still uses the old URI. IS THIS PROBLEM NOT FIXED IN TOMCAT-4.1.12?? That's the only explanation I can think of. I have tried putting mod_jk before mod_rewrite and vice-versa. Here's another question...... when people say to put mod_jk before mod_rewrite in the httpd.conf file, do they mean put the entire set of directives before, or just the LoadModule statement? I've tried several ways.
    Anyway, here is my httpd.conf file. Any suggestions to get this far-more-painful-than-it-needs-to-be process working? Is it a Servlet 2.2 requirement that these configs be hard to use?
    ServerTokens Prod
    # Based upon the NCSA server configuration files originally by Rob McCool.
    # This is the main Apache server configuration file. It contains the
    # configuration directives that give the server its instructions.
    # See <URL:http://www.apache.org/docs/> for detailed information about
    # the directives.
    # Do NOT simply read the instructions in here without understanding
    # what they do. They're here only as hints or reminders. If you are unsure
    # consult the online docs. You have been warned.
    # After this file is processed, the server will look for and process
    # /etc/httpd/conf/srm.conf and then /etc/httpd/conf/access.conf
    # unless you have overridden these with ResourceConfig and/or
    # AccessConfig directives here.
    # The configuration directives are grouped into three basic sections:
    # 1. Directives that control the operation of the Apache server process as a
    # whole (the 'global environment').
    # 2. Directives that define the parameters of the 'main' or 'default' server,
    # which responds to requests that aren't handled by a virtual host.
    # These directives also provide default values for the settings
    # of all virtual hosts.
    # 3. Settings for virtual hosts, which allow Web requests to be sent to
    # different IP addresses or hostnames and have them handled by the
    # same Apache server process.
    # Configuration and logfile names: If the filenames you specify for many
    # of the server's control files begin with "/" (or "drive:/" for Win32), the
    # server will use that explicit path. If the filenames do not begin
    # with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
    # with ServerRoot set to "/usr/local/apache" will be interpreted by the
    # server as "/usr/local/apache/logs/foo.log".
    ### Section 1: Global Environment
    # The directives in this section affect the overall operation of Apache,
    # such as the number of concurrent requests it can handle or where it
    # can find its configuration files.
    # ServerType is either inetd, or standalone. Inetd mode is only supported on
    # Unix platforms.
    ServerType standalone
    # ServerRoot: The top of the directory tree under which the server's
    # configuration, error, and log files are kept.
    # NOTE! If you intend to place this on an NFS (or otherwise network)
    # mounted filesystem then please read the LockFile documentation
    # (available at <URL:http://www.apache.org/docs/mod/core.html#lockfile>);
    # you will save yourself a lot of trouble.
    # Do NOT add a slash at the end of the directory path.
    ServerRoot "/etc/httpd"
    # The LockFile directive sets the path to the lockfile used when Apache
    # is compiled with either USE_FCNTL_SERIALIZED_ACCEPT or
    # USE_FLOCK_SERIALIZED_ACCEPT. This directive should normally be left at
    # its default value. The main reason for changing it is if the logs
    # directory is NFS mounted, since the lockfile MUST BE STORED ON A LOCAL
    # DISK. The PID of the main server process is automatically appended to
    # the filename.
    LockFile /var/run/httpd.lock
    # PidFile: The file in which the server should record its process
    # identification number when it starts.
    PidFile /var/run/httpd.pid
    # ScoreBoardFile: File used to store internal server process information.
    # Not all architectures require this. But if yours does (you'll know because
    # this file will be created when you run Apache) then you must ensure that
    # no two invocations of Apache share the same scoreboard file.
    ScoreBoardFile logs/apache_runtime_status
    # In the standard configuration, the server will process httpd.conf (this
    # file, specified by the -f command line option), srm.conf, and access.conf
    # in that order. The latter two files are now distributed empty, as it is
    # recommended that all directives be kept in a single file for simplicity.
    # The commented-out values below are the built-in defaults. You can have the
    # server ignore these files altogether by using "/dev/null" (for Unix) or
    # "nul" (for Win32) for the arguments to the directives.
    #ResourceConfig conf/srm.conf
    #AccessConfig conf/access.conf
    # Timeout: The number of seconds before receives and sends time out.
    Timeout 300
    # KeepAlive: Whether or not to allow persistent connections (more than
    # one request per connection). Set to "Off" to deactivate.
    KeepAlive On
    # MaxKeepAliveRequests: The maximum number of requests to allow
    # during a persistent connection. Set to 0 to allow an unlimited amount.
    # We recommend you leave this number high, for maximum performance.
    MaxKeepAliveRequests 100
    # KeepAliveTimeout: Number of seconds to wait for the next request from the
    # same client on the same connection.
    KeepAliveTimeout 15
    # Server-pool size regulation. Rather than making you guess how many
    # server processes you need, Apache dynamically adapts to the load it
    # sees --- that is, it tries to maintain enough server processes to
    # handle the current load, plus a few spare servers to handle transient
    # load spikes (e.g., multiple simultaneous requests from a single
    # Netscape browser).
    # It does this by periodically checking how many servers are waiting
    # for a request. If there are fewer than MinSpareServers, it creates
    # a new spare. If there are more than MaxSpareServers, some of the
    # spares die off. The default values are probably OK for most sites.
    MinSpareServers 8
    MaxSpareServers 32
    # Number of servers to start initially --- should be a reasonable ballpark
    # figure.
    StartServers 16
    # Limit on total number of servers running, i.e., limit on the number
    # of clients who can simultaneously connect --- if this limit is ever
    # reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW.
    # It is intended mainly as a brake to keep a runaway server from taking
    # the system with it as it spirals down...
    MaxClients 256
    # MaxRequestsPerChild: the number of requests each child process is
    # allowed to process before the child dies. The child will exit so
    # as to avoid problems after prolonged use when Apache (and maybe the
    # libraries it uses) leak memory or other resources. On most systems, this
    # isn't really needed, but a few (such as Solaris) do have notable leaks
    # in the libraries. For these platforms, set to something like 10000
    # or so; a setting of 0 means unlimited.
    # NOTE: This value does not include keepalive requests after the initial
    # request per connection. For example, if a child process handles
    # an initial request and 10 subsequent "keptalive" requests, it
    # would only count as 1 request towards this limit.
    MaxRequestsPerChild 1000
    # Listen: Allows you to bind Apache to specific IP addresses and/or
    # ports, in addition to the default. See also the <VirtualHost>
    # directive.
    #Listen 3000
    #Listen 12.34.56.78:80
    #Listen 80
    # BindAddress: You can support virtual hosts with this option. This directive
    # is used to tell the server which IP address to listen to. It can either
    # contain "*", an IP address, or a fully qualified Internet domain name.
    # See also the <VirtualHost> and Listen directives.
    #BindAddress *
    # Dynamic Shared Object (DSO) Support
    # To be able to use the functionality of a module which was built as a DSO you
    # have to place corresponding `LoadModule' lines at this location so the
    # directives contained in it are actually available before they are used.
    # Please read the file http://httpd.apache.org/docs/dso.html for more
    # details about the DSO mechanism and run `httpd -l' for the list of already
    # built-in (statically linked and thus always available) modules in your httpd
    # binary.
    # Note: The order in which modules are loaded is important. Don't change
    # the order below without expert advice.
    # Example:
    # LoadModule foo_module modules/mod_foo.so
    #LoadModule mmap_static_module modules/mod_mmap_static.so
    #LoadModule vhost_alias_module modules/mod_vhost_alias.so
    <IfDefine HAVE_BANDWIDTH>
    LoadModule bandwidth_module modules/mod_bandwidth.so
    </IfDefine>
    <IfDefine HAVE_THROTTLE>
    LoadModule throttle_module modules/mod_throttle.so
    </IfDefine>
    #LoadModule env_module modules/mod_env.so
    LoadModule config_log_module modules/mod_log_config.so
    #LoadModule agent_log_module modules/mod_log_agent.so
    #LoadModule referer_log_module modules/mod_log_referer.so
    #LoadModule mime_magic_module modules/mod_mime_magic.so
    LoadModule mime_module modules/mod_mime.so
    #LoadModule negotiation_module modules/mod_negotiation.so
    LoadModule status_module modules/mod_status.so
    LoadModule info_module modules/mod_info.so
    #LoadModule includes_module modules/mod_include.so
    LoadModule autoindex_module modules/mod_autoindex.so
    LoadModule dir_module modules/mod_dir.so
    #LoadModule cgi_module modules/mod_cgi.so
    #LoadModule asis_module modules/mod_asis.so
    #LoadModule imap_module modules/mod_imap.so
    #LoadModule action_module modules/mod_actions.so
    #LoadModule speling_module modules/mod_speling.so
    #LoadModule userdir_module modules/mod_userdir.so
    LoadModule alias_module modules/mod_alias.so
    # Thu 05 Jun 2003 10:12:02 AM PDT <[email protected]>
    LoadModule jk_module     /usr/local/lib/apache/mod_jk.so.ap1.3.27-eapi.rh72
    LoadModule rewrite_module modules/mod_rewrite.so
    LoadModule access_module modules/mod_access.so
    LoadModule auth_module modules/mod_auth.so
    LoadModule anon_auth_module modules/mod_auth_anon.so
    LoadModule db_auth_module modules/mod_auth_db.so
    #LoadModule auth_any_module modules/mod_auth_any.so
    #LoadModule dbm_auth_module modules/mod_auth_dbm.so
    #LoadModule auth_ldap_module modules/mod_auth_ldap.so
    #LoadModule mysql_auth_module modules/mod_auth_mysql.so
    #LoadModule auth_pgsql_module modules/mod_auth_pgsql.so
    #LoadModule digest_module modules/mod_digest.so
    #LoadModule proxy_module modules/libproxy.so
    #LoadModule cern_meta_module modules/mod_cern_meta.so
    LoadModule expires_module modules/mod_expires.so
    LoadModule headers_module modules/mod_headers.so
    #LoadModule usertrack_module modules/mod_usertrack.so
    #LoadModule example_module modules/mod_example.so
    #LoadModule unique_id_module modules/mod_unique_id.so
    LoadModule setenvif_module modules/mod_setenvif.so
    <IfDefine HAVE_PERL>
    LoadModule perl_module modules/libperl.so
    </IfDefine>
    <IfDefine HAVE_PHP>
    LoadModule php_module modules/mod_php.so
    </IfDefine>
    <IfDefine HAVE_PHP3>
    LoadModule php3_module modules/libphp3.so
    </IfDefine>
    <IfDefine HAVE_PHP4>
    LoadModule php4_module modules/libphp4.so
    </IfDefine>
    <IfDefine HAVE_DAV>
    LoadModule dav_module modules/libdav.so
    </IfDefine>
    <IfDefine HAVE_ROAMING>
    LoadModule roaming_module modules/mod_roaming.so
    </IfDefine>
    <IfDefine HAVE_SSL>
    LoadModule ssl_module modules/libssl.so
    </IfDefine>
    <IfDefine HAVE_PUT>
    LoadModule put_module modules/mod_put.so
    </IfDefine>
    <IfDefine HAVE_PYTHON>
    LoadModule python_module modules/mod_python.so
    </IfDefine>
    # Thu 05 Jun 2003 10:12:02 AM PDT <[email protected]>
    #Include /etc/httpd/conf/mod_jk.conf
    <IfModule mod_jk.c>
    JkWorkersFile /usr/local/jboss/server/default/conf/workers.properties
    JkLogFile /var/tmp/jk.log
    JkLogLevel warn
    JkOptions ForwardKeySize ForwardURICompat -ForwardDirectories
    JkMount /*.jsp ajp13
    JkMount /servlet/* ajp13
    JkMount /xml/servlet/* ajp13
    </IfModule>
    <IfModule mod_rewrite.c>
    f
    RewriteEngine on
    RewriteLog /etc/httpd/logs/rewrite.log
    RewriteLogLevel 1
    RewriteRule ^/rwtest/(.*)$ /index.jsp [L]
    </IfModule>
    # Reconstruction of the complete module list from all available modules
    # (static and shared ones) to achieve correct module execution order.
    # [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]
    ClearModuleList
    #AddModule mod_mmap_static.c
    #AddModule mod_vhost_alias.c
    <IfDefine HAVE_BANDWIDTH>
    AddModule mod_bandwidth.c
    </IfDefine>
    <IfDefine HAVE_THROTTLE>
    AddModule mod_throttle.c
    </IfDefine>
    #AddModule mod_env.c
    AddModule mod_log_config.c
    #AddModule mod_log_agent.c
    #AddModule mod_log_referer.c
    #AddModule mod_mime_magic.c
    AddModule mod_mime.c
    #AddModule mod_negotiation.c
    AddModule mod_status.c
    AddModule mod_info.c
    #AddModule mod_include.c
    AddModule mod_autoindex.c
    AddModule mod_dir.c
    #AddModule mod_cgi.c
    #AddModule mod_asis.c
    #AddModule mod_imap.c
    #AddModule mod_actions.c
    #AddModule mod_speling.c
    #AddModule mod_userdir.c
    AddModule mod_alias.c
    AddModule mod_jk.c
    AddModule mod_rewrite.c
    AddModule mod_access.c
    AddModule mod_auth.c
    AddModule mod_auth_anon.c
    AddModule mod_auth_db.c
    #AddModule mod_auth_any.c
    #AddModule mod_auth_dbm.c
    #AddModule auth_ldap.c
    #AddModule mod_auth_mysql.c
    #AddModule mod_auth_pgsql.c
    #AddModule mod_digest.c
    #AddModule mod_proxy.c
    #AddModule mod_cern_meta.c
    AddModule mod_expires.c
    AddModule mod_headers.c
    #AddModule mod_usertrack.c
    #AddModule mod_example.c
    #AddModule mod_unique_id.c
    AddModule mod_so.c
    AddModule mod_setenvif.c
    <IfDefine HAVE_PERL>
    AddModule mod_perl.c
    </IfDefine>
    <IfDefine HAVE_PHP>
    AddModule mod_php.c
    </IfDefine>
    <IfDefine HAVE_PHP3>
    AddModule mod_php3.c
    </IfDefine>
    <IfDefine HAVE_PHP4>
    AddModule mod_php4.c
    </IfDefine>
    <IfDefine HAVE_DAV>
    AddModule mod_dav.c
    </IfDefine>
    <IfDefine HAVE_ROAMING>
    AddModule mod_roaming.c
    </IfDefine>
    <IfDefine HAVE_SSL>
    AddModule mod_ssl.c
    </IfDefine>
    <IfDefine HAVE_PUT>
    AddModule mod_put.c
    </IfDefine>
    <IfDefine HAVE_PYTHON>
    AddModule mod_python.c
    </IfDefine>
    # ExtendedStatus controls whether Apache will generate "full" status
    # information (ExtendedStatus On) or just basic information (ExtendedStatus
    # Off) when the "server-status" handler is called. The default is Off.
    ExtendedStatus On
    ### Section 2: 'Main' server configuration
    # The directives in this section set up the values used by the 'main'
    # server, which responds to any requests that aren't handled by a
    # <VirtualHost> definition. These values also provide defaults for
    # any <VirtualHost> containers you may define later in the file.
    # All of these directives may appear inside <VirtualHost> containers,
    # in which case these default settings will be overridden for the
    # virtual host being defined.
    # If your ServerType directive (set earlier in the 'Global Environment'
    # section) is set to "inetd", the next few directives don't have any
    # effect since their settings are defined by the inetd configuration.
    # Skip ahead to the ServerAdmin directive.
    # Port: The port to which the standalone server listens. For
    # ports < 1023, you will need httpd to be run as root initially.
    Port 80
    ## SSL Support
    ## When we also provide SSL we have to listen to the
    ## standard HTTP port (see above) and to the HTTPS port
    <IfDefine HAVE_SSL>
    Listen 80
    Listen 443
    </IfDefine>
    # If you wish httpd to run as a different user or group, you must run
    # httpd as root initially and it will switch.
    # User/Group: The name (or #number) of the user/group to run httpd as.
    # . On SCO (ODT 3) use "User nouser" and "Group nogroup".
    # . On HPUX you may not be able to use shared memory as nobody, and the
    # suggested workaround is to create a user www and use that user.
    # NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
    # when the value of (unsigned)Group is above 60000;
    # don't use Group "#-1" on these systems!
    User apache
    Group apache
    # ServerAdmin: Your address, where problems with the server should be
    # e-mailed. This address appears on some server-generated pages, such
    # as error documents.
    ServerAdmin [email protected]
    # ServerName allows you to set a host name which is sent back to clients for
    # your server if it's different than the one the program would get (i.e., use
    # "www" instead of the host's real name).
    # Note: You cannot just invent host names and hope they work. The name you
    # define here must be a valid DNS name for your host. If you don't understand
    # this, ask your network administrator.
    # If your host doesn't have a registered DNS name, enter its IP address here.
    # You will have to access it by its address (e.g., http://123.45.67.89/)
    # anyway, and this will make redirections work in a sensible way.
    # 127.0.0.1 is the TCP/IP local loop-back address, often named localhost. Your
    # machine always knows itself by this address. If you use Apache strictly for
    # local testing and development, you may use 127.0.0.1 as the server name.
    #ServerName localhost
    # DocumentRoot: The directory out of which you will serve your
    # documents. By default, all requests are taken from this directory, but
    # symbolic links and aliases may be used to point to other locations.
    DocumentRoot "/usr/local/ourcompany/deploy/webroot"
    # Each directory to which Apache has access, can be configured with respect
    # to which services and features are allowed and/or disabled in that
    # directory (and its subdirectories).
    # First, we configure the "default" to be a very restrictive set of
    # permissions.
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    </Directory>
    # Note that from this point forward you must specifically allow
    # particular features to be enabled - so if something's not working as
    # you might expect, make sure that you have specifically enabled it
    # below.
    # This should be changed to whatever you set DocumentRoot to.
    <Directory "/usr/local/ourcompany/deploy/webroot">
    # This may also be "None", "All", or any combination of "Indexes",
    # "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
    # Note that "MultiViews" must be named explicitly --- "Options All"
    # doesn't give it to you.
    Options Indexes FollowSymLinks
    # This controls which options the .htaccess files in directories can
    # override. Can also be "All", or any combination of "Options", "FileInfo",
    # "AuthConfig", and "Limit"
    AllowOverride None
    # Controls who can get stuff from this server.
    Order allow,deny
    Allow from all
    </Directory>
    # UserDir: The name of the directory which is appended onto a user's home
    # directory if a ~user request is received.
    # The path to the end user account 'public_html' directory must be
    # accessible to the webserver userid. This usually means that ~userid
    # must have permissions of 711, ~userid/public_html must have permissions
    # of 755, and documents contained therein must be world-readable.
    # Otherwise, the client will only receive a "403 Forbidden" message.
    # See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden
    #<IfModule mod_userdir.c>
    # UserDir public_html
    #</IfModule>
    # Control access to UserDir directories. The following is an example
    # for a site where these directories are restricted to read-only.
    #<Directory /home/*/public_html>
    # AllowOverride FileInfo AuthConfig Limit
    # Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    # <Limit GET POST OPTIONS PROPFIND>
    # Order allow,deny
    # Allow from all
    # </Limit>
    # <LimitExcept GET POST OPTIONS PROPFIND>
    # Order deny,allow
    # Deny from all
    # </LimitExcept>
    #</Directory>
    # DirectoryIndex: Name of the file or files to use as a pre-written HTML
    # directory index. Separate multiple entries with spaces.
    <IfModule mod_dir.c>
    DirectoryIndex index.jsp index.html index.htm index.shtml index.php index.php4 index.php3 index.phtml index.cgi
    </IfModule>
    # AccessFileName: The name of the file to look for in each directory
    # for access control information.
    AccessFileName .htaccess
    # The following lines prevent .htaccess files from being viewed by
    # Web clients. Since .htaccess files often contain authorization
    # information, access is disallowed for security reasons. Comment
    # these lines out if you want Web visitors to see the contents of
    # .htaccess files. If you change the AccessFileName directive above,
    # be sure to make the corresponding changes here.
    # Also, folks tend to use names such as .htpasswd for password
    # files, so this will protect those as well.
    <Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
    </Files>
    # CacheNegotiatedDocs: By default, Apache sends "Pragma: no-cache" with each
    # document that was negotiated on the basis of content. This asks proxy
    # servers not to cache the document. Uncommenting the following line disables
    # this behavior, and proxies will be allowed to cache the documents.
    #CacheNegotiatedDocs
    # UseCanonicalName: (new for 1.3) With this setting turned on, whenever
    # Apache needs to construct a self-referencing URL (a URL that refers back
    # to the server the response is coming from) it will use ServerName and
    # Port to form a "canonical" name. With this setting off, Apache will
    # use the hostname:port that the client supplied, when possible. This
    # also affects SERVER_NAME and SERVER_PORT in CGI scripts.
    UseCanonicalName On
    # TypesConfig describes where the mime.types file (or equivalent) is
    # to be found.
    <IfModule mod_mime.c>
    TypesConfig /etc/mime.types
    </IfModule>
    # DefaultType is the default MIME type the server will use for a document
    # if it cannot otherwise determine one, such as from filename extensions.
    # If your server contains mostly text or HTML documents, "text/plain" is
    # a good value. If most of your content is binary, such as applications
    # or images, you may want to use "application/octet-stream" instead to
    # keep browsers from trying to display binary files as though they are
    # text.
    DefaultType text/plain
    # The mod_mime_magic module allows the server to use various hints from the
    # contents of the file itself to determine its type. The MIMEMagicFile
    # directive tells the module where the hint definitions are located.
    # mod_mime_magic is not part of the default server (you have to add
    # it yourself with a LoadModule [see the DSO paragraph in the 'Global
    # Environment' section], or recompile the server and include mod_mime_magic
    # as part of the configuration), so it's enclosed in an <IfModule> container.
    # This means that the MIMEMagicFile directive will only be processed if the
    # module is part of the server.
    <IfModule mod_mime_magic.c>
    # MIMEMagicFile /usr/share/magic.mime
    MIMEMagicFile conf/magic
    </IfModule>
    # HostnameLookups: Log the names of clients or just their IP addresses
    # e.g., www.apache.org (on) or 204.62.129.132 (off).
    # The default is off because it'd be overall better for the net if people
    # had to knowingly turn this feature on, since enabling it means that
    # each client request will result in AT LEAST one lookup request to the
    # nameserver.
    HostnameLookups Off
    # ErrorLog: The location of the error log file.
    # If you do not specify an ErrorLog directive within a <VirtualHost>
    # container, error messages relating to that virtual host will be
    # logged here. If you do define an error logfile for a <VirtualHost>
    # container, that host's errors will be logged there and not here.
    ErrorLog logs/error_log
    # LogLevel: Control the number of messages logged to the error_log.
    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    LogFormat "%{Referer}i -> %U" referer
    LogFormat "%{User-agent}i" agent
    # The location and format of the access logfile (Common Logfile Format).
    # If you do not define any access logfiles within a <VirtualHost>
    # container, they will be logged here. Contrariwise, if you do
    # define per-<VirtualHost> access logfiles, transactions will be
    # logged therein and not in this file.
    # CustomLog /var/log/httpd/access_log common
    #CustomLog logs/access_log combined
    # If you would like to have agent and referer logfiles, uncomment the
    # following directives.
    #CustomLog logs/referer_log referer
    #CustomLog logs/agent_log agent
    # If you prefer a single logfile with access, agent, and referer information
    # (Combined Logfile Format) you can use the following directive.
    #CustomLog logs/access_log combined
    CustomLog "|/usr/sbin/cronolog -H /var/log/httpd/access /var/log/httpd/%Y/%m/access.%Y-%m-%d" combined
    # Optionally add a line containing the server version and virtual host
    # name to server-generated pages (error documents, FTP directory listings,
    # mod_status and mod_info output etc., but not CGI generated documents).
    # Set to "EMail" to also include a mailto: link to the ServerAdmin.
    # Set to one of: On | Off | EMail
    ServerSignature EMail
    # EBCDIC configuration:
    # (only for mainframes using the EBCDIC codeset, currently one of:
    # Fujitsu-Siemens' BS2000/OSD, IBM's OS/390 and IBM's TPF)!!
    # The following default configuration assumes that "text files"
    # are stored in EBCDIC (so that you can operate on them using the
    # normal POSIX tools like grep and sort) while "binary files" are
    # stored with identical octets as on an ASCII machine.
    # The directives are evaluated in configuration file order, with
    # the EBCDICConvert directives applied before EBCDICConvertByType.
    # If you want to have ASCII HTML documents and EBCDIC HTML documents
    # at the same time, you can use the file extension to force
    # conversion off for the ASCII documents:
    # > AddType text/html .ahtml
    # > EBCDICConvert Off=InOut .ahtml
    # EBCDICConvertByType On=InOut text/* message/* multipart/*
    # EBCDICConvertByType On=In application/x-www-form-urlencoded
    # EBCDICConvertByType On=InOut application/postscript model/vrml
    # EBCDICConvertByType Off=InOut */*
    # Aliases: Add here as many aliases as you need (with no limit). The format is
    # Alias fakename realname
    <IfModule mod_alias.c>
    # Note that if you include a trailing / on fakename then the server will
    # require it to be present in the URL. So "/icons" isn't aliased in this
    # example, only "/icons/". If the fakename is slash-terminated, then the
    # realname must also be slash terminated, and if the fakename omits the
    # trailing slash, the realname must also omit it.
    Alias /clipart/ "/usr/local/ourcompany/data/clipart/"
    <Directory "/usr/local/ourcompany/data/clipart">
    Options MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>
    Alias /image_upload/ "/usr/local/ourcompany/data/labels/"
    <Directory "/usr/local/ourcompany/data/labels">
    Options MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>
    # This Alias will project the on-line documentation tree under /manual/
    # even if you change the DocumentRoot. Comment it if you don't want to
    # provide access to the on-line documentation.
    # Alias /manual/ "/etc/httpd/htdocs/manual/"
    # <Directory "/etc/httpd/htdocs/manual">
    # Options Indexes FollowSymlinks MultiViews
    # AllowOverride None
    # Order allow,deny
    # Allow from all
    # </Directory>
    # ScriptAlias: This controls which directories contain server scripts.
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the realname directory are treated as applications and
    # run by the server when requested rather than as documents sent to the client.
    # The same rules about trailing "/" apply to ScriptAlias directives as to
    # Alias.
    ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
    # "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
    # CGI directory exists, if you have that configured.
    <Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
    </Directory>
    </IfModule>
    # End of aliases.
    # Redirect allows you to tell clients about documents which used to exist in
    # your server's namespace, but do not anymore. This allows you to tell the
    # clients where to look for the relocated document.
    # Format: Redirect old-URI new-URL
    # Directives controlling the display of server-generated directory listings.
    <IfModule mod_autoindex.c>
    # FancyIndexing is whether you want fancy directory indexing or standard
    IndexOptions FancyIndexing NameWidth=*
    # AddIcon* directives tell the server which icon to show for different
    # files or filename extensions. These are only displayed for
    # FancyIndexed directories.
    AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
    AddIconByType (TXT,/icons/text.gif) text/*
    AddIconByType (IMG,/icons/image2.gif) image/*
    AddIconByType (SND,/icons/sound2.gif) audio/*
    AddIconByType (VID,/icons/movie.gif) video/*
    AddIcon /icons/binary.gif .bin .exe
    AddIcon /icons/binhex.gif .hqx
    AddIcon /icons/tar.gif .tar
    AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
    AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
    AddIcon /icons/a.gif .ps .ai .eps
    AddIcon /icons/layout.gif .html .shtml .htm .pdf
    AddIcon /icons/text.gif .txt
    AddIcon /icons/

    Please note: I AM USING:
    JkOptions ForwardKeySize ForwardURICompat -ForwardDirectories
    And that's what's supposed to fix this problem in the first place, right??

  • [SOLVED] Problem with .htaccess and user dirs.

    Hi!..
    I write here because i have a problem with .htaccess files and url rewrites.
    I deployed a Cakephp[1] app in my /home/~asmerkin/public_html/books directory. This folder contains a .htaccess file with the following directives:
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ^$ app/webroot/ [L]
    RewriteRule (.*) app/webroot/$1 [L]
    </IfModule>
    My server works well in user directories but it fails to rewrite urls. When i go to http://localhost/~asmerkin/books/ apache returns 404 error. If i go to apache log i find this:
    [Sat Sep 04 02:02:02 2010] [error] [client 127.0.0.1] File does not exist: /srv/http/home
    So the .htaccess is working but the url it rewrites is not correct. My httpd.conf file is this file[2]  and my httpd-userdir.conf is this one[3].
    So i'd like to know if somebody can help me with this issue. I tried everything without results.
    Thank you!
    [1]: Cakephp.org
    [2]: http://perkin.pastebin.com/g0dbbW2P
    [3]: http://perkin.pastebin.com/fprNYCRY
    Last edited by Perkin (2010-09-06 11:24:55)

    Finally i had to edit my .htaccess file adding a RewriteBase rule to it.

  • Please help!  Strange problem with HTTPD.Conf and OC4J (I think)

    Hi,
    We have been trying to configure the 10g "infrastructure" Apache server/instance to work with our own authentication module, and as part of this, we need to configure a directory alias containing some of our JSPs. To do this, the only thing that we did was that we took the standard HTTPD.CONF file that got installed with the 10g AS installation, and added a small section at the end.
    However, we are finding that if our addition to the HTTPD.CONF is included, instead of the JSPs in our aliased directory being processed, Apache seems to be just serving the JSPs as text pages :(..
    If we remove the section at the end of the HTTPD.CONF, and point a browser to the unaliased path, the JSPs get processed correctly.
    I was wondering if anyone here might take a look at our HTTPD.CONF below, and tell me if you can see something there that might be causing this behavior? The section that we added is at the very end. We think that the problem might be something like the "order" of the directives, etc. in the HTTPD.CONF file may be such that the alias is taking priority ahead of the OC4J, or something like that.
    Thanks in advance, and apologies for the long message.
    Jim
    =====================================================
    ServerType standalone
    ServerRoot "/orad59/10gAS/infrastructure/Apache/Apache"
    PidFile /orad59/10gAS/infrastructure/Apache/Apache/logs/httpd.pid
    ScoreBoardFile /orad59/10gAS/infrastructure/Apache/Apache/logs/httpd.scoreboard
    Timeout 300
    KeepAlive On
    MaxKeepAliveRequests 100
    KeepAliveTimeout 15
    MinSpareServers 5
    MaxSpareServers 20
    StartServers 5
    MaxClients 150
    MaxRequestsPerChild 0
    LoadModule onsint_module libexec/mod_onsint.so
    LoadModule mmap_static_module libexec/mod_mmap_static.so
    LoadModule vhost_alias_module libexec/mod_vhost_alias.so
    LoadModule env_module libexec/mod_env.so
    LoadModule define_module libexec/mod_define.so
    LoadModule config_log_module libexec/mod_log_config.so
    LoadModule agent_log_module libexec/mod_log_agent.so
    LoadModule referer_log_module libexec/mod_log_referer.so
    LoadModule mime_magic_module libexec/mod_mime_magic.so
    LoadModule mime_module libexec/mod_mime.so
    LoadModule negotiation_module libexec/mod_negotiation.so
    LoadModule status_module libexec/mod_status.so
    LoadModule info_module libexec/mod_info.so
    LoadModule includes_module libexec/mod_include.so
    LoadModule autoindex_module libexec/mod_autoindex.so
    LoadModule dir_module libexec/mod_dir.so
    LoadModule cgi_module libexec/mod_cgi.so
    LoadModule asis_module libexec/mod_asis.so
    LoadModule imap_module libexec/mod_imap.so
    LoadModule action_module libexec/mod_actions.so
    LoadModule speling_module libexec/mod_speling.so
    LoadModule userdir_module libexec/mod_userdir.so
    LoadModule alias_module libexec/mod_alias.so
    LoadModule access_module libexec/mod_access.so
    LoadModule auth_module libexec/mod_auth.so
    LoadModule anon_auth_module libexec/mod_auth_anon.so
    LoadModule dbm_auth_module libexec/mod_auth_dbm.so
    LoadModule digest_module libexec/mod_digest.so
    LoadModule proxy_module libexec/libproxy.so
    LoadModule cern_meta_module libexec/mod_cern_meta.so
    LoadModule expires_module libexec/mod_expires.so
    LoadModule headers_module libexec/mod_headers.so
    LoadModule usertrack_module libexec/mod_usertrack.so
    LoadModule unique_id_module libexec/mod_unique_id.so
    LoadModule setenvif_module libexec/mod_setenvif.so
    LoadModule perl_module libexec/libperl.so
    LoadModule fastcgi_module libexec/mod_fastcgi.so
    <IfDefine SSL>
    LoadModule ossl_module libexec/mod_ossl.so
    </IfDefine>
    LoadModule wchandshake_module libexec/mod_wchandshake.so
    ExtendedStatus On
    Port 7777
    Listen 7777
    User oracle
    Group dba
    ServerAdmin [email protected]
    ServerName ge1ssd04.test.com
    DocumentRoot "/orad59/10gAS/infrastructure/Apache/Apache/htdocs"
    <Directory />
    Options FollowSymLinks MultiViews
    AllowOverride None
    </Directory>
    <Directory "/orad59/10gAS/infrastructure/Apache/Apache/htdocs">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>
    <IfModule mod_userdir.c>
    UserDir public_html
    </IfModule>
    <IfModule mod_dir.c>
    DirectoryIndex index.html
    </IfModule>
    AccessFileName .htaccess
    <Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    </Files>
    UseCanonicalName On
    <IfModule mod_mime.c>
    TypesConfig /orad59/10gAS/infrastructure/Apache/Apache/conf/mime.types
    AddEncoding x-compress Z
    AddEncoding x-gzip gz tgz
    AddLanguage ar .ar
    AddLanguage da .dk .da
    AddLanguage nl .nl
    AddLanguage en .en
    AddLanguage et .ee
    AddLanguage fi .fi
    AddLanguage fr .fr
    AddLanguage de .de
    AddLanguage el .el
    AddLanguage es .es_ES .es
    AddLanguage he .he .iw
    AddLanguage hu .hu
    AddCharset ISO-8859-8 .iso8859-8
    AddLanguage it .it
    AddLanguage ja .ja
    AddCharset ISO-2022-JP .jis
    AddLanguage ko .ko
    AddLanguage kr .kr
    AddCharset ISO-2022-KR .iso-kr
    AddLanguage nn .nn
    AddLanguage no .no
    AddLanguage pl .po
    AddCharset ISO-8859-2 .iso-pl
    AddLanguage pt .pt
    AddLanguage pt-br .pt_BR .pt-br
    AddLanguage ltz .lu
    AddLanguage ca .ca
    AddLanguage sk .sk
    AddLanguage sv .sv
    AddLanguage th .th
    AddLanguage tr .tr
    AddLanguage cz .cz .cs
    AddLanguage ro .ro
    AddLanguage ru .ru
    AddLanguage zh-cn .zh_CN
    AddLanguage zh-tw .zh_TW
    AddCharset Big5 .Big5 .big5
    AddCharset WINDOWS-1251 .cp-1251
    AddCharset CP866 .cp866
    AddCharset ISO-8859-5 .iso-ru
    AddCharset KOI8-R .koi8-r
    AddCharset UCS-2 .ucs2
    AddCharset UCS-4 .ucs4
    AddCharset UTF-8 .utf8
    <IfModule mod_negotiation.c>
    LanguagePriority ar en da nl et fi fr de el it ja ko kr no pl pt pt-br ro ru ltz ca es sk sv th tr zh-cn zh-tw zh-cn
    </IfModule>
    AddType application/x-tar .tgz
    </IfModule>
    DefaultType text/plain
    <IfModule mod_mime_magic.c>
    MIMEMagicFile /orad59/10gAS/infrastructure/Apache/Apache/conf/magic
    </IfModule>
    HostnameLookups Off
    ErrorLog "|/orad59/10gAS/infrastructure/Apache/Apache/bin/rotatelogs /orad59/10gAS/infrastructure/Apache/Apache/logs/error_log 43200"
    LogLevel warn
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
    LogFormat "%{Referer}i -> %U" referer
    LogFormat "%{User-agent}i" agent
    CustomLog "|/orad59/10gAS/infrastructure/Apache/Apache/bin/rotatelogs /orad59/10gAS/infrastructure/Apache/Apache/logs/access_log 43200" common
    ServerSignature On
    <IfModule mod_alias.c>
    Alias /icons/ "/orad59/10gAS/infrastructure/Apache/Apache/icons/"
    Alias /jservdocs/ "/orad59/10gAS/infrastructure/Apache/Jserv/docs/"
    Alias /javacachedocs/ "/orad59/10gAS/infrastructure/javacache/javadoc/"
    <IfModule mod_perl.c>
    Alias /perl/ "/orad59/10gAS/infrastructure/Apache/Apache/cgi-bin/"
    </IfModule>
    <Directory "/orad59/10gAS/infrastructure/Apache/Apache/icons">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>
    ScriptAlias /cgi-bin/ "/orad59/10gAS/infrastructure/Apache/Apache/cgi-bin/"
    <Directory "/orad59/10gAS/infrastructure/Apache/Apache/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
    </Directory>
    </IfModule>
    <IfModule mod_autoindex.c>
    IndexOptions FancyIndexing
    AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
    AddIconByType (TXT,/icons/text.gif) text/*
    AddIconByType (IMG,/icons/image2.gif) image/*
    AddIconByType (SND,/icons/sound2.gif) audio/*
    AddIconByType (VID,/icons/movie.gif) video/*
    AddIcon /icons/binary.gif .bin .exe
    AddIcon /icons/binhex.gif .hqx
    AddIcon /icons/tar.gif .tar
    AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
    AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
    AddIcon /icons/a.gif .ps .ai .eps
    AddIcon /icons/layout.gif .html .shtml .htm .pdf
    AddIcon /icons/text.gif .txt
    AddIcon /icons/c.gif .c
    AddIcon /icons/p.gif .pl .py
    AddIcon /icons/f.gif .for
    AddIcon /icons/dvi.gif .dvi
    AddIcon /icons/uuencoded.gif .uu
    AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
    AddIcon /icons/tex.gif .tex
    AddIcon /icons/bomb.gif core
    AddIcon /icons/back.gif ..
    AddIcon /icons/hand.right.gif README
    AddIcon /icons/folder.gif ^^DIRECTORY^^
    AddIcon /icons/blank.gif ^^BLANKICON^^
    ReadmeName README
    HeaderName HEADER
    IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
    </IfModule>
    <IfModule mod_setenvif.c>
    BrowserMatch "Mozilla/2" nokeepalive
    BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
    BrowserMatch "RealPlayer 4\.0" force-response-1.0
    BrowserMatch "Java/1\.0" force-response-1.0
    BrowserMatch "JDK/1\.0" force-response-1.0
    </IfModule>
    <Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from localhost ge1ssd04.test.com ge1ssd04
    </Location>
    SetEnv PERL5LIB "/orad59/10gAS/infrastructure/perl/lib/5.6.1:/orad59/10gAS/infrastructure/perl/lib/site_perl/5.6.1"
    <IfModule mod_perl.c>
    PerlModule Apache
    PerlModule Apache::Registry
    <Location /perl>
    SetHandler perl-script
    PerlHandler Apache::Registry
    AddHandler perl-script .pl
    Options +ExecCGI
    PerlSendHeader On
    </Location>
    </IfModule>
    <DirectoryMatch /WEB-INF/>
    Order deny,allow
    Deny from all
    </DirectoryMatch>
    <IfModule mod_fastcgi.c>
    Alias /fastcgi/ "/orad59/10gAS/infrastructure/Apache/fastcgi/"
    ScriptAlias /fcgi-bin/ "/orad59/10gAS/infrastructure/Apache/Apache/fcgi-bin/"
    <Directory "/orad59/10gAS/infrastructure/Apache/Apache/fcgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
    SetHandler fastcgi-script
    <IfModule mod_ossl.c>
    SSLOptions +StdEnvVars
    </IfModule>
    </Directory>
    </IfModule>
    PassEnv ORACLE_HOME
    PassEnv LD_LIBRARY_PATH
    PassEnv NLS_LANG
    PassEnv TNS_ADMIN
    <IfModule mod_oprocmgr.c>
    <Location /oprocmgr-service>
    SetHandler oprocmgr-service
    Order deny,allow
    Deny from all
    Allow from localhost ge1ssd04.test.com ge1ssd04
    </Location>
    <Location /oprocmgr-status>
    SetHandler oprocmgr-status
    Order deny,allow
    Deny from all
    Allow from localhost ge1ssd04.test.com ge1ssd04
    </Location>
    </IfModule>
    include "/orad59/10gAS/infrastructure/Apache/Apache/conf/mod_oc4j.conf"
    include "/orad59/10gAS/infrastructure/Apache/Apache/conf/dms.conf"
    LoadModule rewrite_module libexec/mod_rewrite.so
    include "/orad59/10gAS/infrastructure/Apache/Apache/conf/ssl.conf"
    include "/orad59/10gAS/infrastructure/Apache/Apache/conf/mod_osso.conf"
    include "/orad59/10gAS/infrastructure/Apache/Apache/conf/oracle_apache.conf"
    # MY ADDITIONS TO HTTPD.CONF GO BELOW HERE....
    LoadModule my_auth_module /opt/myagent/apache/lib/libmy_apache_agent_mod_ssl.so
    AddModule my_apache_mod.c
    <IfModule my_apache_mod.c>
         MYAgentRoot /opt/myagent/apache
    </IfModule>
    <IfModule my_apache_mod.c>
    <Location />
    AuthType Basic
    Require valid-user
    AuthName MYAUTH
    </Location>
    </IfModule>
    <IfModule my_apache_mod.c>
    Alias /mydir/ "/orad59/10gAS/infrastructure/j2ee/OC4J_SECURITY/applications/sso/web/jsp/myagentdir/"
    <Directory "/orad59/10gAS/infrastructure/j2ee/OC4J_SECURITY/applications/sso/web/jsp/myagentdir/">
    AuthType Basic
    Require valid-user
    AuthName MYAUTH
    </Directory>
    </IfModule>

    Hi,
    I wanted to post what we found on this.
    As indicated in my original msg, we had an Alias directory in the httpd.conf. However, after thinking about the problem a bit, I think that the Alias was not the right thing to do.
    The Alias tells Apache to map a URL fragment to a FILESYSTEM location. Well, obviously, Apache only SERVES pages... it doesn't process JSPs.
    We switched to using a Redirect directive instead of the Alias, and things worked a little better, but we've run into a bit of a problem with "Redirect looping", but that's a different story :)...
    Jim

  • IE load is OK, Problem with Firefox...tries to load from local drive

    My own website, in Firefox, opens fine when it is the Home (index.php) page OR a link from my homepage to a third party website. BUT, links from the home page to my other pages do not bring up images, possibly do not use the css (not sure), and try to load from the local drive. IE works with no problem whatsoever.
    I think it may be a problem with the .htaccess file, as deleting/renaming the file makes it worse in both Firefox & IE. Also, the function that is causing the problem is the Apache .htaccess function Mod_rewrite...which can redirect browsers, regardless of what is written in an html or php web page file.
    Turning off the redirect function in .htaccess is worse for Firefox, but (I believe) not for IE. This rewrite function is available with recent versions of Apached, but not older ones.
    Any help would be appreciated. This is starting to get really "old".

    Solved this:
    Turns out that we now require at least "List" permissions for "Everyone" for the root of the partition where the User profiles reside.
    This was not the case on our previous images.
    Hopes this helps someone else.

  • Problems with Mac OS X Server and webperfcache...

    I'm running Mac OS X server 10.4.11 and I'm trying to get mod_rewrite to work (thus far unsuccessfully). As part of my debugging strategy I want to turn everything around apache off and start pulling things apart to see if I can get them to make sense. When I turn the web performance cache off on all my sites using the site administration utility, apache gets a bus error when it attempts to restart. When I turn web performance caching back on, apache continues to get a bus error. Reboots, et al. don't clear up the problem and all I can do is go back to my system backup and bring up the previous day's version, which I can currently live with.
    Has anybody seen this before? Alternatively, has anybody had problems getting mod_rewrite to work and can give some advice. I'm doing pretty much everything that works on other U*x based systems and has worked before, but the lack of control over the ports used by the web sites on my system is problematic and I would, at the very least, like to be able to turn off webperfcache.
    Thanks in advance,
    Dick Munroe

    I am actually going to be doing almost exactly the same thing in the next 1-2 weeks. My plan is to make the OS X server a BDC on the domain, then promote it to PDC and retire the Windows Server 2k3 PDC.
    I have 1 Win2k3 PDC and 1 Win2k3 (64-bit) Terminal Server. My main worry is whether the PDC is handling the licence CALs for the TS.... if it is, that will interfere with the plan.
    Email me and let's discuss this off-line.
    Thanks,

  • A problem with threads

    I am trying to implement some kind of a server listening for requests. The listener part of the app, is a daemon thread that listens for connections and instantiates a handling daemon thread once it gets some. However, my problem is that i must be able to kill the listening thread at the user's will (say via a sto button). I have done this via the Sun's proposed way, by testing a boolean flag in the loop, which is set to false when i wish to kill the thread. The problem with this thing is the following...
    Once the thread starts excecuting, it will test the flag, find it true and enter the loop. At some point it will LOCK on the server socket waiting for connection. Unless some client actually connects, it will keep on listening indefinatelly whithought ever bothering to check for the flag again (no matter how many times you set the damn thing to false).
    My question is this: Is there any real, non-theoretical, applied way to stop thread in java safely?
    Thank you in advance,
    Lefty

    This was one solution from the socket programming forum, have you tried this??
    public Thread MyThread extends Thread{
         boolean active = true;          
         public void run(){
              ss.setSoTimeout(90);               
              while (active){                   
                   try{                       
                        serverSocket = ss.accept();
                   catch (SocketTimeoutException ste){
                   // do nothing                   
         // interrupt thread           
         public void deactivate(){               
              active = false;
              // you gotta sleep for a time longer than the               
              // accept() timeout to make sure that timeout is finished.               
              try{
                   sleep(91);               
              }catch (InterruptedException ie){            
              interrupt();
    }

  • Problem with Threads and a static variable

    I have a problem with the code below. I am yet to make sure that I understand the problem. Correct me if I am wrong please.
    Code functionality:
    A timer calls SetState every second. It sets the state and sets boolean variable "changed" to true. Then notifies a main process thread to check if the state changed to send a message.
    The problem as far I understand is:
    Assume the timer Thread calls SetState twice before the main process Thread runs. As a result, "changed" is set to true twice. However, since the main process is blocked twice during the two calls to SetState, when it runs it would have the two SetState timer threads blocked on its synchronized body. It will pass the first one, send the message and set "changed" to false since it was true. Now, it will pass the second thread, but here is the problem, "changed" is already set to false. As a result, it won't send the message even though it is supposed to.
    Would you please let me know if my understanding is correct? If so, what would you propose to resolve the problem? Should I call wait some other or should I notify in a different way?
    Thanks,
    B.D.
    Code:
    private static volatile boolean bChanged = false;
    private static Thread objMainProcess;
       protected static void Init(){
            objMainProcess = new Thread() {
                public void run() {
                    while( objMainProcess == Thread.currentThread() ) {
                       GetState();
            objMainProcess.setDaemon( true );
            objMainProcess.start();
        public static void initStatusTimer(){
            if(objTimer == null)
                 objTimer = new javax.swing.Timer( 1000, new java.awt.event.ActionListener(){
                    public void actionPerformed( java.awt.event.ActionEvent evt){
                              SetState();
        private static void SetState(){
            if( objMainProcess == null ) return;
            synchronized( objMainProcess ) {
                bChanged = true;
                try{
                    objMainProcess.notify();
                }catch( IllegalMonitorStateException e ) {}
        private static boolean GetState() {
            if( objMainProcess == null ) return false;
            synchronized( objMainProcess ) {
                if( bChanged) {
                    SendMessage();
                    bChanged = false;
                    return true;
                try {
                    objMainProcess.wait();
                }catch( InterruptedException e ) {}
                return false;
        }

    Thanks DrClap for your reply. Everything you said is right. It is not easy to make them alternate since SetState() could be called from different places where the state could be anything else but a status message. Like a GREETING message for example. It is a handshaking message but not a status message.
    Again as you said, There is a reason I can't call sendMessage() inside setState().
    The only way I was able to do it is by having a counter of the number of notifies that have been called. Every time notify() is called a counter is incremented. Now instead of just checking if "changed" flag is true, I also check if notify counter is greater than zero. If both true, I send the message. If "changed" flag is false, I check again if the notify counter is greater than zero, I send the message. This way it works, but it is kind of a patch than a good design fix. I am yet to find a good solution.
    Thanks,
    B.D.

  • Problem with threads running javaw

    Hi,
    Having a problem with multi thread programming using client server sockets. The program works find when starting the the application in a console using java muti.java , but when using javaw multi.java the program doesnt die and have to kill it in the task manager. The program doesnt display any of my gui error messages either when the server disconnect the client. all works find in a console. any advice on this as I havent been able to understand why this is happening? any comment would be appreciated.
    troy.

    troy,
    Try and post a minimum code sample of your app which
    does not work.
    When using javaw, make sure you redirect the standard
    error and standard output streams to file.
    Graeme.Hi Graeme,
    I dont understand what you mean by redirection to file? some of my code below.
    The code works fine under a console, code is supposed to exit when the client (the other server )disconnects. the problem is that but the clientworker side of the code still works. which under console it doesnt.
    public class Server{
    ServerSocket aServerSocket;
    Socket dianosticsSocket;
    Socket nPortExpress;
    ClientListener aClientListener;
    LinkedList queue = new LinkedList();
    int port = 0;
    int clientPort = 0;
    String clientName = null;
    boolean serverAlive = true;
    * Server constructor generates a server
    * Socket and then starts a client threads.
    * @param aPort      socket port of local machine.
    public Server(int aPort, String aClientName, int aClientPort){
    port = aPort;
    clientName = aClientName;
    clientPort = aClientPort;
    try{
    // create a new thread
    aServerSocket = new ServerSocket(port) ;
    // connect to the nPortExpress
    aClientListener = new ClientListener(InetAddress.getByName(clientName), clientPort, queue,this);
    // aClientListener.setDaemon(true);
    aClientListener.start();
    // start a dianostic port
    DiagnosticsServer aDiagnosticsServer = new DiagnosticsServer(port,queue,aClientListener);
    // System.out.println("Server is running on port " + port + "...");
    // System.out.println("Connect to nPort");
    catch(Exception e)
    // System.out.println("ERROR: Server port " + port + " not available");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Server port " + port + " not available", JOptionPane.ERROR_MESSAGE);
    serverAlive = false;
    System.exit(1);
    while(serverAlive&&aClientListener.hostSocket.isConnected()){
    try{
    // connect the client
    Socket aClient = aServerSocket.accept();
    //System.out.println("open client connection");
    //System.out.println("client local: "+ aClient.getLocalAddress().toString());
    // System.out.println("client localport: "+ aClient.getLocalPort());
    // System.out.println("client : "+ aClient.getInetAddress().toString());
    // System.out.println("client port: "+ aClient.getLocalPort());
    // make a new client thread
    ClientWorker clientThread = new ClientWorker(aClient, queue, aClientListener, false);
    // start thread
    clientThread.start();
    catch(Exception e)
    //System.out.println("ERROR: Client connection failure");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Client connection failure", JOptionPane.ERROR_MESSAGE);
    }// end while
    } // end constructor Server
    void serverExit(){
         JOptionPane.showMessageDialog(null, "Server ","ERROR: nPort Failure", JOptionPane.ERROR_MESSAGE);
         System.exit(1);
    }// end class Server
    *** connect to another server
    public class ClientListener extends Thread{
    InetAddress hostName;
    int hostPort;
    Socket hostSocket;
    BufferedReader in;
    PrintWriter out;
    boolean loggedIn;
    LinkedList queue;      // reference to Server queue
    Server serverRef; // reference to main server
    * ClientListener connects to the host server.
    * @param aHostName is the name of the host eg server name or IP address.
    * @param aHostPort is a port number of the host.
    * @param aLoginName is the users login name.
    public ClientListener(InetAddress aHostName, int aHostPort,LinkedList aQueue,Server aServer)      // reference to Server queue)
    hostName = aHostName;
    hostPort = aHostPort;
    queue = aQueue;
    serverRef = aServer;      
    // connect to the server
    try{
    hostSocket = new Socket(hostName, hostPort);
    catch(IOException e){
    //System.out.println("ERROR: Connection Host Failed");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Connection to nPort Failed", JOptionPane.ERROR_MESSAGE);     
    System.exit(0);
    } // end constructor ClientListener
    ** multi client connection server
    ClientWorker(Socket aSocket,LinkedList aQueue, ClientListener aClientListener, boolean diagnostics){
    queue = aQueue;
    addToQueue(this);
    client = aSocket;
    clientRef = aClientListener;
    aDiagnostic = diagnostics;
    } // end constructor ClientWorker
    * run method is the main loop of the server program
    * in change of handle new client connection as well
    * as handle all messages and errors.
    public void run(){
    boolean alive = true;
    String aSubString = "";
    in = null;
    out = null;
    loginName = "";
    loggedIn = false;
    while (alive && client.isConnected()&& clientRef.hostSocket.isConnected()){
    try{
    in = new BufferedReader(new InputStreamReader(client.getInputStream()));
    out = new PrintWriter(new OutputStreamWriter(client.getOutputStream()));
    if(aDiagnostic){
    out.println("WELCOME to diagnostics");
    broadCastDia("Connect : diagnostics "+client.getInetAddress().toString());
    out.flush();
    else {       
    out.println("WELCOME to Troy's Server");
    broadCastDia("Connect : client "+client.getInetAddress().toString());
         out.flush();
    String line;
    while(((line = in.readLine())!= null)){
    StringTokenizer aStringToken = new StringTokenizer(line, " ");
    if(!aDiagnostic){
    broadCastDia(line);
    clientRef.sendMessage(line); // send mesage out to netExpress
    out.println(line);
    out.flush();
    else{
    if(line.equals("GETIPS"))
    getIPs();
    else{
    clientRef.sendMessage(line); // send mesage out to netExpress
    out.println(line);
    out.flush();
    } // end while
    catch(Exception e){
    // System.out.println("ERROR:Client Connection reset");
                             JOptionPane.showMessageDialog(null, (e.toString()),"ERROR:Client Connection reset", JOptionPane.ERROR_MESSAGE);     
    try{
    if(aDiagnostic){
    broadCastDia("Disconnect : diagnostics "+client.getInetAddress().toString());
    out.flush();
    else {       
    broadCastDia("Disconnect : client "+client.getInetAddress().toString());
         out.flush();
    // close the buffers and connection;
    in.close();
    out.close();
    client.close();
    // System.out.println("out");
    // remove from list
    removeThreadQueue(this);
    alive = false;
    catch(Exception e){
    // System.out.println("ERROR: Client Connection reset failure");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Client Connection reset failure", JOptionPane.ERROR_MESSAGE);     
    }// end while
    } // end method run
    * method run - Generates io stream for communicating with the server and
    * starts the client gui. Run also parses the input commands from the server.
    public void run(){
    boolean alive = true;
    try{
    // begin to life the gui
    // aGuiClient = new ClientGui(hostName.getHostName(), hostPort, loginName, this);
    // aGuiClient.show();
    in = new BufferedReader(new InputStreamReader(hostSocket.getInputStream()));
    out = new PrintWriter(new OutputStreamWriter(hostSocket.getOutputStream()));
    while (alive && hostSocket.isConnected()){
    String line;
    while(((line = in.readLine())!= null)){
    System.out.println(line);
    broadCast(line);
    } // end while
    } // end while
    catch(Exception e){
    //     System.out.println("ERRORa Connection to host reset");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Connection to nPort reset", JOptionPane.ERROR_MESSAGE);
    try{
    hostSocket.close();
         }catch(Exception a){
         JOptionPane.showMessageDialog(null, (a.toString()),"ERROR: Exception", JOptionPane.ERROR_MESSAGE);
    alive = false;
    System.exit(1);
    } // end method run

  • Problem with threads and camera.

    Hi everybody!
    I've a problem with taking snapshot.
    I would like to display a loading screen after it take snapshot ( sometimes i
    have to wait few seconds after i took snapshot. Propably photo is being taken in time where i have to wait).
    I was trying to use threads but i didn't succeed.
    I made this code:
    display.setCurrent(perform);               
            new Thread(new Runnable(){
                public void run() {               
                    while((!performing.isShown()) && (backgroundCamera.isShown())){
                        Thread.yield();
                    notifyAll();
            }).start();
            new Thread(new Runnable(){
                public void run() {
                    try {
                        this.wait();                   
                    } catch(Exception e) {
                        exceptionHandler(e);
                    photo = camera.snapshot();                               
                    display.setCurrent(displayPhoto);
            }).start();This code is sometimes showing performing screen but sometimes no.
    I don't know why. In my opinion performing.isShown() method isn't working correctly.
    Does anyone have some idea how to use threads here?

    Hi,
    I've finally managed to work this fine.
    The code:
           Object o = new Object();
           display.setCurrent(perform);               
            new Thread(new Runnable(){
                public void run() {               
                    while(!performing.isShown()){
                        Thread.yield();
                   synchronized(o) {
                      o.notify();
            }).start();
            new Thread(new Runnable(){
                public void run() {
                    try {
                        synchronized(o) {
                           o.wait(1);
                    } catch(Exception e) {
                        exceptionHandler(e);
                    photo = camera.snapshot();                               
                    display.setCurrent(displayPhoto);
            }).start();

  • Problem with threads hanging

    We have a problem where our application stops responding after a few days of usage. Things will for fine for a day or two, and then pretty quickly threads will start getting hung up, usually in places where they are allocating memory
    We are running WebLogic 8.1 SP2 on Sun JDK 1.4.2_04 on Solaris 8 using the alternate threading model and the -server hotspot vm. We are running pretty much the same code that we had no problems with under WebLogic 6.1 SP4 and Sun JDK 1.3.1.
    A thread dump usually shows that some or all of our execute threads are in the state "waiting for monitor entry" even though they are not currently waiting on any java locks. Here is a sample thread from the thread dump (we have ~120 threads so I don't want to post the full dump).
    =============================================================================================
    "ExecuteThread: '8' for queue: 'itgCrmWarExecutionQueue'" daemon prio=5 tid=0x005941d0 nid=0x2c waiting for monitor entry [c807f000..c807fc28]
    at java.lang.String.substring(String.java:1446)
    at java.lang.String.substring(String.java:1411)
    at weblogic.servlet.internal.ServletRequestImpl.getRelativeUri(ServletRequestImpl.java:1872)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3492)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    =============================================================================================
    String.java line 1446 for this jdk allocates a new String object, and all the other threads in this state also are creating new objects or arrays, etc.
    We've done a pstack on this process when it's in this state, and the threads that are in the "waiting for monitor entry" that look like they're allocating memory are all waiting on the same lwp_mutex_lock with some allocation method that's calling into the native TwoGenerationCollectorPolicy.mem_allocate_work (see pstack output below for the same thread as in the thread dump above)
    =============================================================================================
    ----------------- lwp# 44 / thread# 44 --------------------
    ff31f364 lwp_mutex_lock (e3d70)
    fee92384 __1cNObjectMonitorGenter26MpnGThread__v_ (5000, 525c, 5000, 50dc, 4800, 4af0) + 2d8
    fee324d4 __1cSObjectSynchronizerKfast_enter6FnGHandle_pnJBasicLock_pnGThread__v_ (c807f65c, c807f7d4, 5941d0, 0, 35d654, fee328ec) + 68
    fee32954 __1cQinstanceRefKlassZacquire_pending_list_lock6FpnJBasicLock__v_ (c807f7d4, ff170000, d4680000, 4491d4, fee1bc2c,
    0) + 78
    fee3167c __1cPVM_GC_OperationNdoit_prologue6M_i_ (c807f7bc, 4400, ff170000, 2d2b8, 4a6268, c807fa18) + 38
    fee2e0b0 __1cIVMThreadHexecute6FpnMVM_Operation__v_ (c807f7bc, 963a8, 0, 0, 1, 0) + 90
    fed2c2a4 __1cbCTwoGenerationCollectorPolicyRmem_allocate_work6MIii_pnIHeapWord__ (962c0, ff1c29ec, ff1c297c, ff131a26, 4800, 4998) + 160
    fed22940 __1cNinstanceKlassRallocate_instance6MpnGThread__pnPinstanceOopDesc__ (ee009020, 5941d0, 15ca581, 3647f0, 4a6268, c807f8c8) + 180
    fed34928 __1cLOptoRuntimeFnew_C6FpnMklassOopDesc_pnKJavaThread__v_ (ee009018, 5941d0, 0, 0, 0, 0) + 28
    fa435a58 ???????? (ee009018, e86de, 15ca4de, 50dc, 5941d0, c807f9c8)
    fb36f9a4 ???????? (0, d412ccd8, ee046c28, ff170000, 0, 0)
    fad8b278 ???????? (ee046c28, d6000c90, ee046530, 8, db8e8450, c807f9e8)
    fad62abc ???????? (d412ccd8, ee046530, d6000c90, ee3bfa38, 8, c807fa18)
    fa4b3c38 ???????? (c807fb9c, 0, f2134700, fa415e50, 8, c807faa8)
    fa40010c ???????? (c807fc28, c807fe90, a, ee9e1e20, 4, c807fb40)
    fed5d48c __1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_ (c807fe88, c807fcf0, c807fda8, 5941d0, 5941d0, c807fd00) + 27c
    fee4b784 __1cJJavaCallsMcall_virtual6FpnJJavaValue_nLKlassHandle_nMsymbolHandle_4pnRJavaCallArguments_pnGThread__v_ (ff170000, 594778, c807fd9c, c807fd98, c807fda8, 5941d0) + 164
    fee5e8dc __1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_5pnGThread__v_ (c807fe88, c807fe84, c807fe7c, c807fe74, c807fe6c, 5941d0) + 6c
    fee6fc74 __1cMthread_entry6FpnKJavaThread_pnGThread__v_ (5941d0, 5941d0, 838588, 594778, 306d10, fee69254) + 128
    fee6927c __1cKJavaThreadDrun6M_v_ (5941d0, 2c, 40, 0, 40, 0) + 284
    fee6575c _start   (5941d0, fa1a1600, 0, 0, 0, 0) + 134
    ff3758c0 lwpstart (0, 0, 0, 0, 0, 0)
    =============================================================================================
    Also when it's having this problem, the "VM Thread" is always using a lot of processor time. We did a couple of pstacks today while it was having this problem, and this thread was stuck in the ONMethodSweeper.sweep for over 15 minutes when we finally killed the server.
    From the thread dump:
    "VM Thread" prio=5 tid=0x000e2d20 nid=0x2 runnable
    From the first pstack:
    =============================================================================================
    ----------------- lwp# 2 / thread# 2 --------------------
    fed40c04 __1cXvirtual_call_RelocationIparse_ic6FrpnICodeBlob_rpC5rppnHoopDesc_pi_nNRelocIterator__ (42a2f4, fa5fa46d, ffffffff, fc4ffcb8, 42a2f4, 42a324) + 124
    fed46318 __1cKCompiledIC2t5B6MpnKRelocation__v_ (42a2f0, fc4ffd24, fc4ffd4c, e802, 0, 6) + 38
    fed90c38 __1cHnmethodVcleanup_inline_caches6M_v_ (fa5f7f88, fa608940, 1, 0, fa400000, 6) + 1ac
    fede18b4 __1cONMethodSweeperFsweep6F_v_ (2cf38, 0, ffffffff, ff1cf1fc, ff1c66e8, fede1d44) + 1b0
    fede1e6c __1cUSafepointSynchronizeFbegin6F_v_ (2cf38, ff1ba138, 5000, 50dc, 5000, 525c) + 248
    feef1fd4 __1cIVMThreadEloop6M_v_ (4400, 4000, 4324, 4000, 42b0, 3800) + 3d4
    feef1ae4 __1cIVMThreadDrun6M_v_ (e2d20, 2, 40, 0, 40, 0) + 8c
    fee6575c _start   (e2d20, ff270200, 0, 0, 0, 0) + 134
    ff3758c0 lwpstart (0, 0, 0, 0, 0, 0)
    =============================================================================================
    Second pstack
    =============================================================================================
    ----------------- lwp# 2 / thread# 2 --------------------
    fed41180 __1cXvirtual_call_RelocationIparse_ic6FrpnICodeBlob_rpC5rppnHoopDesc_pi_nNRelocIterator__ (0, ff1b9664, ffffffff, fc4ffcb8, a6f2cc, fc4ffbd0) + 6a0
    fed46318 __1cKCompiledIC2t5B6MpnKRelocation__v_ (a6f2c8, fc4ffd24, fc4ffd4c, e802, 0, 6) + 38
    fed90c38 __1cHnmethodVcleanup_inline_caches6M_v_ (faded4c8, fadf2c80, 1, 0, fa400000, 6) + 1ac
    fede18b4 __1cONMethodSweeperFsweep6F_v_ (2cf38, 0, ffffffff, ff1cf1fc, ff1c66e8, fede1d44) + 1b0
    fede1e6c __1cUSafepointSynchronizeFbegin6F_v_ (2cf38, ff1ba138, 5000, 50dc, 5000, 525c) + 248
    feef1fd4 __1cIVMThreadEloop6M_v_ (4400, 4000, 4324, 4000, 42b0, 3800) + 3d4
    feef1ae4 __1cIVMThreadDrun6M_v_ (e2d20, 2, 40, 0, 40, 0) + 8c
    fee6575c _start   (e2d20, ff270200, 0, 0, 0, 0) + 134
    ff3758c0 lwpstart (0, 0, 0, 0, 0, 0)
    =============================================================================================
    Has anyone ever seen anything like this? I'm trying to figure out if this is caused by something we're doing, or something relating to our environment and jvm options. Any ideas?

    Thanks for the reply - I'm testing our app with the +UseConcMarkSweepGC now in our test environment to make sure it doesn't cause any problems there.  Unfortunately the only place we've had this problem is on the production server, so it's extra difficult debugging this. 
    We're using the following memory options:
    -ms512m -mx512m -XX:NewSize=128m -XX:PermSize=192m -XX:MaxNewSize=128m -XX:MaxPermSize=192m -XX:SurvivorRatio=8and the following debugging options, as we've also been seeing OutOfMemoryErrors ( see http://forum.java.sun.com/thread.jsp?forum=37&thread=522354&tstart=45&trange=15 )
    -verbosegc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGCBTW, which c++filt version and options are you using? Our Solaris boxes only seem to have the GNU version installed. I was trying to run that on some of the other stack traces and wasn't getting anywhere, and didn't know if because it was GNU version wouldn't work on something compiled with the Sun compiler.
    Thanks!
    --Andy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Problem with threads and ProgressMonitor

    Dear Friends:
    I have a little problem with a thread and a ProgressMonitor. I have a long time process that runs in a thread (the thread is in an separate class). The thread has a ProgressMonitor that works fine and shows the tasks progress.
    But I need deactivate the main class(the main class is the user interface) until the thread ends.
    I use something like this:
    LongTask myTask=new LongTask();
    myTask.start();
    myTask.join();
    Now, the main class waits for the task to end, but the progress monitor don`t works fine: it shows only the dialog but not the progress bar.
    What's wrong?

    Is the dialog a modal dialog? This can block other UI updates.
    In general, you should make sure that it isn't modal, and that your workThread has a fairly low priority so that the UI can do its updating

  • Problem with threads and/or memory

    I'm developing an application where there are 3 threads. One of them sends a request to the other, and if the 2nd can't answer it, it sends it to the 3rd (similar to CPU -> CACHE -> MEMORY). When i run the program with 1000-10.000 requests, no problem occurs. When i run it with 300.000-1.000.000 requests, it sometimes hangs. Is this a problem with the garbage collector, or should it be related to the threads mecanism.
    (note: eache thread is in execution using a finite state machine)

    i had been running the program inside Netbeans.
    Running the jar using the command line outside
    Netbeans i have no more problems... Does Netbeans use
    it's own JVM?Depends how you set it up, but look under the options. There are settings for the compiler and jvm that it uses.

Maybe you are looking for