title: Change Jenkins basepath
body: <p>I'm trying to serve a stock jenkins installation (on Amazon Linux AMI) thru myjenkinsinstance:8080/jenkins (rather than myjenkinsinstance:8080), and then proxy this with e.g. Nginx (over HTTP).</p>
  
  <p>This question has been 'answered' before, but the solution doesn't seem to be relevant anymore.</p>
  
  <p>@admins I would prefer to comment on that thread (specifically <a href="https://stackoverflow.com/a/32521495/5657321">this</a> 'answer'), rather than opening a duplicate, but I am not allowed to, per my 'reputation' score (as my comment would not be a solution at all, but further request for help).</p>
  
  <p>From the closest thing to an answer I've seen:</p>
  
  <blockquote>
    <ol>
    <li>Go to Jenkins Home Directory ( I have mine in C:\Jenkins)</li>
    <li>Edit jenkins.xml</li>
    <li>Add this <code>--prefix=/jenkins</code> to the end of the argument as show below and restart the jenkins service ALL worked OK for me !</li>
    </ol>
    
    <p>Example :  <code>&lt;arguments&gt;-Xrs-Xmx256mDhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%\jenkins.war" --httpPort=8080 --prefix=/jenkins&lt;/arguments&gt;</code></p>
    
    <ol start="4">
    <li>Open Url <a href="http://localhost:8080/jenkins" rel="nofollow noreferrer">http://localhost:8080/jenkins</a> this should bring up the home page of jenkins</li>
    </ol>
  </blockquote>
  
  <ul>
  <li>there is no 'jenkins.xml' in the $JENKINS_HOME directory, but there is a config.xml</li>
  <li>there is no <code>&lt;arguments/&gt;</code> entry in the config.xml</li>
  <li>there seems to be no other configuration for the initial installation</li>
  </ul>
  
  <p>There's also a 'Jenkins Location > Jenkins URL' setting in the "Configure System" settings (myjenkinsinstance/configure), but modifying this seems to have no noticeable affect.</p>
  
  <p>The end goal would be to automate this installation via e.g. CloudFormation (as part of the EC2's UserData).</p>
  
  <p>Any suggestions would be greatly appreciated.</p>