Can't find config for http...

Help
HansA
2013-10-21
2013-10-25
  • HansA
    HansA
    2013-10-21

    Hi

    Error message is generated to Apache log (error_log) when trying to access content generated with LXR.

    fatal: LXR::Common, line 870: Can't find config for http://162.64.23.128/source at lib/LXR/Common.pm line 870.

    used versions:
    LXR 1.2.0
    Fedora 17
    Apache/2.2.23 (Fedora)

    Any ideas how to fix the problem?

    Br,
    HansÅ

     
  • Andre-Littoz
    Andre-Littoz
    2013-10-21

    Hi,

    This error is generated when LXR can't match an URL with a tree description in lxr.conf. A synthetic URL is reconstructed from parameters in lxr.conf (mainly 'host_names' and 'virtroot' in 1.2.0) depending on the single/multiple tree context. Please send your lxr.conf so that I can diagnose the problem.

    Notes:
    1) Since you get the message, your server configuration seems OK (otherwise the URL would not have been routed to LXR).
    2) If you consider your lxr.conf contains sensitive private data, send it through my SF mailing @dress: ajlittos (at) users (dot) sourceforge (dot) net.

    Regards,
    ajl

     
    Last edit: Andre-Littoz 2013-10-22
  • HansA
    HansA
    2013-10-23

    Thanks!
    Now I managed to get step forward. I set IP address to 'host_names' (it was '//localhost' before).

    # Computer DNS names subsection #
    #================================
    ,    'host_names' =>    [ '//162.64.23.128'
                            ]
    

    But still there is problems to locate the actual code. Message 'The file /index.c does not exist.' can be found from the HTML page (http://162.64.23.128/source)

    Br,
    HansÅ

     
    Attachments
  • Andre-Littoz
    Andre-Littoz
    2013-10-23

    From a quick examination of your lxr.conf, your source tree is located in a sub-directory of your personal directory, namely:

    ~/code/v1
    

    e.g. your test file index.c is stored in

    ~/code/v1/index.c
    

    Your tree has a single version and, commonly, users forget to create the single-version directory which automatically results in the "does not exist" message since LXR looks for the file as sourceroot/version/file. Check that the "v1" directory exists and has correct access permissions (at least rw-??-r--, ? is for don't care) because the web server runs with its own user-id and group which are different from yours.

    If this is not the case, I'll ask for more information.

    Regards,
    ajl

     
  • HansA
    HansA
    2013-10-25

    Web server couldn't access the files in my home directory (/home/huolto/code/v1) although all access permissions was set.
    When I moved code away from 'home' folder it started to work.

    Thanks for help

    Br,
    HansÅ

     
  • Andre-Littoz
    Andre-Littoz
    2013-10-25

    Then, it may be a matter of SELinux labelling. If you know how to do it, this can be fixed with the SELinux management GUI tool, "boolean" section. Some of these booleans control various privileges for Apache. I personally check the "Allow httpd to read user directories", but this may raise a security issue if you are in an untrusted environment.

    Otherwise, if you're satisfied with your work around, it is also a valid solution.

    Regards,
    ajl