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 -e "ssh" -rtlzv --delete firstname.lastname@example.org: /dir/on/local/discor (potentially insecure):
rsync -rtlzv --delete cran.r-project.org::CRAN /dir/on/local/discPlease send your public SSH key to email@example.com in advance and do 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 .htaccess file (typically synced with the CRAN mirror) in CRAN's root directory does the rest of the configuration. If this last step fails for some reason (e.g., you do not allow .htaccess files, which is the default since Apache 2.4) then you have to add the following lines to your Apache configuration:
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 .htaccess files by default. The previously mentioned .htaccess file also enables the syntax in banner.shtml to be recognised and in order to use it, change your Apache Configuration to:
If this last step fails, or you do not want to allow .htaccess files, then you have to add the following line to your Apache configuration, similar to the Rewrite Rules:
Thanks in advance for providing webspace for the R Project!