Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have jira installed on my server.
It was running at http://[my ip address]:8100. I changed it to http://jira.[my domain].com.

Now after I access it at http://jira.[my domain].com, a browser path changes to http://jira.[my domain].com:8100/secure/Dashboard.jspa.

  1. Why does the port show up?
  2. Is there any way to remove 8100 port from this redirect. I'd like it to be http://jira.[my domain].com/secure/Dashboard.jspa
  3. Also my jira now responds both to jira.[my domain].com and [my ip address]:8100. The latter one is corrupted. Is it possible to stop user accessing it?
share|improve this question

1 Answer 1

up vote 0 down vote accepted

As you're not mentioning having JIRA configured with SSL which can include needing to place a proxyName entry in the jira/conf/server.xml which could redirect I'll assume that you haven't gone into the Administration screen and updated your Base URL setting. You don't mention what you have listening on port 80 for the jira hostname but I assume it's Apache.

Below is the Apache config I use for my JIRA instance:

<VirtualHost *:80>
    ServerName jira.example.net

        ErrorLog ${APACHE_LOG_DIR}/jira-error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/jira-access.log combined

    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>

    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

    # ProxyRequests Off
    # ProxyPreserveHost on
    # ProxyPass / http://jira.internal.host:8080/ connectiontimeout=5 timeout=300
    # ProxyPassReverse / http://jira.internal.host:8080/
</VirtualHost>
<VirtualHost *:443>
    ServerName jira.undergrid.net

        ErrorLog ${APACHE_LOG_DIR}/jira-error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/jira-access.log combined

    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>

    SSLEngine on
    SSLProxyEngine on
    SSLCertificateFile    /etc/ssl/certs/jira.example.net.crt
    SSLCertificateKeyFile /etc/ssl/private/jira.example.net.key
    SSLCACertificatePath  /etc/ssl/certs/

    ProxyRequests Off
    ProxyPreserveHost on
    ProxyPass / http://jira.internal.host:8080/ connectiontimeout=5 timeout=300
    ProxyPassReverse / http://jira.internal.host:8080/
</VirtualHost>

In my case the Apache and JIRA servers are running on 2 different machines but the config can work regardless of that. With that in place I then updated the jira/conf/server.xml to include the following:

    <Connector port="8080"

               maxThreads="150"
               minSpareThreads="25"
               maxSpareThreads="75"
               connectionTimeout="20000"

               scheme="https"
               proxyName="jira.example.net"
               proxyPort="443"

               enableLookups="false"
               maxHttpHeaderSize="8192"
               protocol="HTTP/1.1"
               useBodyEncodingForURI="true"
               redirectPort="8443"
               acceptCount="100"
               disableUploadTimeout="true"/>

        <Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
          maxHttpHeaderSize="8192" SSLEnabled="true"
          maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
          enableLookups="false" disableUploadTimeout="true"
          acceptCount="100" scheme="https" secure="true"
          keystoreFile="${user.home}/.keystore" keyAlias="jira.example.net"
          clientAuth="false" sslProtocol="TLS" useBodyEncodingForURI="true"/>

          <Connector port="8009" redirectPort="8443" enableLookups="false" protocol="AJP/1.3" URIEncoding="UTF-8"/>

The final step was to update the Base URL by logging into JIRA as a JIRA Administrator and going to Administration -> System -> General Configuration and editing the Base URL to ready https://jira.example.net

share|improve this answer
    
Thank you! This is a great help!! –  Ivan Zamylin Sep 17 '12 at 7:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.