简体   繁体   中英

The requested URL /solr/admin/ping was not found on this server

I am using nelmio/solarium-bundle . I have configured this bundle but I have error in running this test file:

Symfony/vendor/solarium/solarium/examples/1.1-check-solarium-and-ping.php

This is error:

Fatal error: Uncaught exception 'Solarium\Exception\HttpException' with message ' in C:\wamp\www\Symfony2\vendor\solarium\solarium\library\Solarium\Core\Query\Result\Result.php on line 103

Solarium\Exception\HttpException: Solr HTTP error: OK (404) <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /solr/admin/ping was not found on this server.</p> <hr> <address>Apache/2.4.9 (Win64) PHP/5.5.12 Server at 127.0.0.1 Port 80</address> </body></html> in C:\wamp\www\Symfony2\vendor\solarium\solarium\library\Solarium\Core\Query\Result\Result.php on line 103

This is the bundle's configuration in my config.yml :

nelmio_solarium: ~

I have modified config.dist.php file :

$config = array(
    'endpoint' => array(
        'localhost' => array(
            'host' => '127.0.0.1',
            'port' => null,
            'path' => '/solr',
        )
    )
);

为什么您的端口为null,则应该使用8983之类的内容。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM