title: Creating a webserver CRAN repository - troubleshooting the directory structure
body: <p>I'm trying to figure out how to create a http CRAN-repository. I've tried to follow the <a href="https://stackoverflow.com/questions/2905650/creating-a-local-cran-repository">local CRAN repository</a> without no real success.</p>
  
  <p>Basically I have my local repository set up like this (I'm not sure the source catalog makes sens but I added it just in case):</p>
  
  <pre><code>library(tools)
  reposRoot &lt;- "C:\\Software\\repository"
  r_ver &lt;- "2.15"
  contribPaths &lt;- c(source = "src\\contrib", windows = "bin\\windows\\contrib")
  write_PACKAGES(paste(reposRoot, contribPaths["windows"], r_ver, sep="\\"), 
                 type="win.binary",
                 unpacked=FALSE,
                 latestOnly=FALSE,
                 verbose=TRUE)
  write_PACKAGES(paste(reposRoot, contribPaths["source"], r_ver, sep="\\"), 
                 type="source",
                 unpacked=FALSE,
                 latestOnly=FALSE,
                 verbose=TRUE)
  </code></pre>
  
  <p>I've then uploaded the repository to my webserver: <a href="http://cran.gforge.se" rel="nofollow noreferrer">cran.gforge.se</a> but when I try find the packages I get:</p>
  
  <pre><code>&gt; available.packages(contriburl="http://cran.gforge.se")
  Warning: unable to access index for repository http://cran.gforge.se
       Package Version Priority Depends Imports LinkingTo Suggests Enhances OS_type License Archs
       File Repository
  </code></pre>
  
  <p>So my conclusion is that it can't find the repository but the strange part is when I try:</p>
  
  <pre><code>&gt; available.packages(contriburl="http://cran.gforge.se/bin/windows/contrib/2.15")
        Package Version Priority Depends                                                   Imports
  Gmisc "Gmisc" "0.2"   NA       "grid, testthat, miscTools, rms, Hmisc, survival, cmprsk" NA     
        LinkingTo Suggests Enhances OS_type License      Archs File
  Gmisc NA        NA       NA       NA      "GPL (&gt;= 2)" NA    NA  
        Repository                                                    
  Gmisc "http://cran.gforge.se/bin/windows/contrib/2.15/./src/contrib"
  </code></pre>
  
  <p>It actually finds my beautiful package but the path is all mixed-up. If I try to run an install I get this:</p>
  
  <pre><code>&gt; install.packages("Gmisc", contriburl="http://cran.gforge.se/")
  Installing package(s) into ‘C:/Users/max/R/win-library/2.15’
  (as ‘lib’ is unspecified)
  Warning in install.packages :
    package ‘Gmisc’ is not available (for R version 2.15.0)
  &gt; install.packages("Gmisc", contriburl="http://cran.gforge.se/bin/windows/contrib/2.15")
  Installing package(s) into ‘C:/Users/max/R/win-library/2.15’
  (as ‘lib’ is unspecified)
  trying URL 'http://cran.gforge.se/bin/windows/contrib/2.15/./src/contrib/Gmisc_0.2.zip'
  Warning in install.packages :
    cannot open: HTTP status was '500 Internal Server Error'
  Error in download.file(url, destfile, method, mode = "wb", ...) : 
    cannot open URL 'http://cran.gforge.se/bin/windows/contrib/2.15/./src/contrib/Gmisc_0.2.zip'
  Warning in install.packages :
    download of package ‘Gmisc’ failed
  </code></pre>
  
  <p>I've looked for any help in <a href="http://cran.r-project.org/doc/manuals/R-admin.html#Setting-up-a-package-repository" rel="nofollow noreferrer">the manual</a> and <a href="http://sonivis.org/wiki/index.php/HowTo_set_up_a_R_repository" rel="nofollow noreferrer">SONIVIS wiki</a> but I must be blind... please guide me :-S</p>