Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's happening with search.cpan.org and how to install an redirector?

Tags:

perl

cpan

EDITED question

It last 2 weeks search.cpan.org was down many times. Yes i know here is a metacpan, but zilion of links from the net points to search.cpan.org so the metacpan isn't the "only" solution.

Want make a local redirector, by entering to my /etc/hosts something like:

search.cpan.org    127.0.0.1

and run an simple PSGI (or Apache) server on localhost:80 what should done the redirects. So the requests for "search.cpan.org" would be processed at "localhost" with the script and it should return valid 302 responses and redirect to metacpan.org.

@Mpapec pointed to mcpan.org - what doing exactly for what i looking, so now enoudh redirect every request to "mcpan.org".

After edited my /etc/hosts as above, tried the next apache config:

<VirtualHost *:80>
        ServerName search.cpan.org
        RedirectPermanent / http://search.mcpan.org/
</VirtualHost>

but doesn't work. Would be nice to get some help. Or an alternative, a simple app.psgi script would be nice too.

So, the questions are:

  • how to configure local apache for redirects search.cpan.org -> search.mcpan.org
  • or how to write a simple app.psgi for running it with plackup -p 80 for the same function

and one offtopic question:

  • know anyone something about the status and a future of search.cpan.org?
like image 754
jm666 Avatar asked May 19 '14 10:05

jm666


People also ask

How do I get CPAN?

To be eligible to sit for both the CPAN and CAPA exams, you must meet the licensure and direct care requirements and have: at least 1,200 hours of direct clinical experience caring for patients in Postanesthesia Phase I.

How do I remove a CPAN module?

Type cpanm --uninstall Module::Name (note the " m ") to uninstall the module with cpanminus.


2 Answers

search.cpan.org is run by Graham Barr. For questions about websites that he runs, you'll have to contact him.

The source code is not available. That's why MetaCPAN sprang up.

I wouldn't bother with a redirector. Maybe a Greasemonkey script, though :)

like image 92
brian d foy Avatar answered Sep 19 '22 23:09

brian d foy


I was an configuration error in my apache. The next works.

1.) edit /etc/hosts and add a line IP.OF.YOUR.LOCAL.WEBSERVER search.cpan.org, e.g.:

127.0.0.1 search.cpan.org

2.) for apache (i have 2.4) into httpd.conf enter

<VirtualHost *:80>
        ServerName search.cpan.org
        Redirect / http://search.mcpan.org/
</VirtualHost>

3.) Be sure than your apache listening on port 80 e.g. have a directive

Listen 80

With the above, every request to "search.cpan.org" get redirected to "search.mcpan.org" and the "mcpan" redirects it to "metacpan". It is suboptimal, would be nicer to have a set of rewrite rules what redirects directly into "metacpan", but works.

like image 36
jm666 Avatar answered Sep 20 '22 23:09

jm666