We currently have no written set of rules when we accept a new mirror into the official list. PHP accepts only up to two mirrors per country, we think there may be need to treat China different from, say, Luxembourg. So use common sense and ask yourself whether your mirror helps the R community. We want good global coverage, but also short lists on the mirror webpage or in a GUI. In addition, human time is involved in maintaining the list and monitoring it. If there is no mirror in your country, it will usually accepted. Otherwise ask first if in doubt.
rsync -rtlzv --delete cran.r-project.org::CRAN /dir/on/local/discDo not forget the --delete flag to remove files from the mirror that are no longer present on the master.
If you use the Apache web server and want to promote the hosting institution of the mirror you may want to add something like
SetEnv CRAN_HOST "This server is hosted by bla bla bla ..."to your Apache configuration. The string "This server ..." (which may contain HTML markup) will be added in the footer of the CRAN top page, see the main server for an example. You also need something like
# # To use server-parsed HTML files # AddType text/html .shtml AddHandler server-parsed .shtmlin the MIME-types section of the Apache configuration, the exact syntax depends on the version of Apache. All you have to do is uncomment these (or similar) lines in the default configuration.
Furthermore, it is necessary that your web server is configured to allow redirections. You need this to enable redirection to package web pages. E.g.,
http://cran.r-project.org/web/packages/foo/index.htmlThe same also is possible for task views:
http://cran.r-project.org/view=barIf you use the Apache web server this feature can be enabled by loading the mod_rewrite module. A
RewriteEngine on RewriteRule ^package=(.+) /web/packages/$1/index.html [R=seeother] RewriteRule ^view=(.+) /web/views/$1.html [R=seeother]
Apache version 2.4 and newer does not recognise the syntax used in banner.shtml and allow the use of
AllowOverride AllIf this last step fails, or you do not want to allow
Thanks in advance for providing webspace for the R Project!