All posts by Mala

How to force JIRA to use different Landing or Login Page


The default login page for Jira is http://localhost/secure/Dashboard.jspa, but I have encountered a situation where I need to force Jira to use different page as landing/login page.  Here are the configuration changes I made:

To remove the logon gadget from the intro page you need to:

Edit the jira-application.properties file located atWEB-INFclasses you can set the property jira.disable.login.gadget parameter to true.

Restart JIRA.

If you want to force users when they go to the default page to force a login you can change the default.jsp page with a redirect like below:

response.sendRedirect(“ ” + request.getRequestURL() + “secure/Dashboard.jspa”);

After the change my default.jsp looks like below:

    if (request != null)

    {

        response.sendRedirect(“https://myurl.com” + request.getContextPath() + “/secure/Dashboard.jspa”);

        return;

    }

Also make sure to escape any & characters in your URL, or you may get XML errors.

Subversion Log Rotation


The Apache rotatelogs program supports automatically starting a new log file whenever the current log file reaches a certain size or has had records written to it for a certain period of time. However, the rotatelogs program, rotatelogs.exe, as implemented in

rotatelogs logfile [ rotationtime [ offset ]] | [ filesizeM ]

In your subversion installation, you have to edit the httpd.conf file to set the right configuration. Ex: /etc/opt/CollabNet_Subversion/conf/httpd.conf

 sudo vi /etc/opt/CollabNet_Subversion/conf/httpd.conf

Create the following entries:

ErrorLog "|/opt/CollabNet_Subversion/bin/rotatelogs  /var/opt/CollabNet_Subversion/logs/error_log.%c  86400 -300"
CustomLog "|/opt/CollabNet_Subversion/bin/rotatelogs /var/opt/CollabNet_Subversion/logs/access_log.%c 86400 -300" common

Make sure to comment the existing entries related to error and access logs.

# ErrorLog var/opt/CollabNet_Subversion/logs/error_log

# CustomLog var/opt/CollabNet_Subversion/logs/access_log common

After saving the httpd.conf, Stop and Start the Subversion:

sudo /opt/CollabNet_Subversion/bin/apachectl -k stop
sudo /opt/CollabNet_Subversion/bin/apachectl -k start

How it works?

ErrorLog “|/opt/CollabNet_Subversion/bin/rotatelogs  /var/opt/CollabNet_Subversion/logs/error_log.%c  86400 -300″

CustomLog “|/opt/CollabNet_Subversion/bin/rotatelogs /var/opt/CollabNet_Subversion/logs/access_log.%c 86400 -300″ common

These parameters specify that rotatelogs, when writing the log file for error and access records will:

•  Place the file in the logs folder, and give it a file name starting with Error_ – the rest of the file name contains a date stamp

•  Check whether to create a new log file every 24 hour (86400 seconds)

•  Use a 5-hour offset from the GMT (-300 minutes)

Whenever the rotatelogs program checks whether to start a new log file (Every 24 hours in the case above) it also checks every log file in the log file directory, created by that rotatelogs process, create and modify timestamps are older than the retention period.

The rotatelogs process for error and access logging will not delete any access log files, or vice versa. The % symbols in the log file name direct the rotatelogs program to treat them as strftime substitution characters. In the case of error log files, the file name Error_%c.log causes rotatelogs to create a file with the date and time stamp.

For the list of all ‘%’ symbols that you can use in the file name, and their meanings, see: http://httpd.apache.org/docs-2.0/programs/rotatelogs.html

Apache, does not support automatic cleanup of old log files – the administrator has to delete old log files to prevent the disk from filling up.

Add the below line in cron tab so that log files will be removed if they are  more than 5 days old.

export EDITOR=vi
sudo crontab -e
30     1     *     *     * find /var/opt/CollabNet_Subversion/logs/ -type f -mtime +5 -exec rm {} ;

Save the crontab.

Your Subversion installation is ready to rotate logs.

 

How to enable SSL for subversion?


  • Edit httpd.conf file in the subversion installation location

cd /etc/opt/CollabNet_Subversion/con

sudo vi httpd.conf

  • Make sure the following line is not commented

Include etc/opt/CollabNet_Subversion/conf/extra/httpd-ssl.conf

  • Edit key and cert file info in etc/opt/CollabNet_Subversion/conf/extra/httpd-ssl.conf

Edit following lines with the right certificate and key files. Also make sure to comment if any existing similar configuration.

SSLCertificateFile /usr/local/apache2/ssl/************.crt
SSLCertificateKeyFile /usr/local/apache2/ssl/**********.key

  • Edit port info in etc/opt/CollabNet_Subversion/conf/extra/httpd-ssl.conf

Edit the following lines with available port no. Make sure to configure with unused port no.

Listen 4443

VirtualHost _default_:4443

  • Stop and Restart subversion

sudo /opt/CollabNet_Subversion/bin/apachectl -k stop
sudo /opt/CollabNet_Subversion/bin/apachectl -k start

     Now your subversion is SSL ready.

Looking for a Job? We have position available…


Date of Opening:    5/14/2012

Date of Closing:     6/15/2012

Sr. Software Engineer needed w/Masters degree in Computer Information Systems or Computer Science or Engineering & 1 yr. exp in the following job duties: Organize, direct and coordinate Java/J2EE builds and deployments using industry standard techniques. Design, develop and test software applications using JDBC,  Swing, SQL Server, Apache Tomcat, and Junit test cases. Design and implement data and business object models using Rational Rose, ClearCase and ClearQuest.

1 yr. exp as Programmer Analyst is acceptable.

Mail resumes to: Miinfosys LLC

4005 Williamsburg Court, 2nd Floor, Fairfax, VA 22032 Job Loc: Fairfax, VA