Re: [Lxr-general] Correct path to access index result?
Brought to you by:
ajlittoz
|
From: Ulf S. <ulf...@er...> - 2016-06-07 14:40:15
|
Problem finally solved,
The problem was the access rights of my home directory which was set to 700
Best Regards
Ulf Samuelsson
On 05/30/2016 09:42 AM, Ulf Samuelsson wrote:
> Have finally got a web page up with LXR-2.1.0, but no useable contents.
>
> Generated an index for the project "vlmctrl" located in
> /home/eulfsam/projects/LXR/vlmctrl
> Databases in /etc/local/db/glimpse
>
> ./scripts/configure-lxr.pl -vv # Documentation is no longer
> correct.
> ./custom.d/initdb.sh
> cp custom.d/lxr.conf .
>
> ./genxref --url=http://localhost/lxr --version=vlmctrl
>
> ./genxref --url=http://localhost/lxr --version=v1
> sudo a2enconf apache-lxrserver.conf
> sudo a2dismod mpm*
> sudo apt-get install apache2-mpm-worker
> sudo a2enmod mpm_worker
> # Version not available in Ubuntu 14.04
> /etc/init.d/apache2 restart
>
> The LXR web page comes up at "http://localhost/lxr/source/lxr/",
> and there is a link "vlmctrl", but nothing happens when I click on it.
> This is not surprising since the link point at itself.
>
> I have tried
> * http://localhost/lxr => Forbidden
> * http://localhost/lxr/source => Perl source code
> * http://localhost/lxr/source/lxr => Seems to be the correct web page,
> with appropriate menus, and a drop down list where I can select
> vlmctrl,
> but when selecting "vlmctrl", nothing happens.
> There is a "vlmctrl" link, which points at the same page.
> There is a red error message:
>
> /The directory / does not exist, is empty or is hidden by an exclusion
> rule./
>
> So what is supposed to be the correct link to access the tree?
>
>
>
> I enclose the setup.
> ==================================================================================
> lxr.conf
>
> # -*- mode: perl -*-
> # LXR master configuration file
> #
>
> (
> ################################
> # Global configuration section #
> ################################
>
> {
> #
> # Master mode (where to find the tree name) #
> #===========================================#
>
> # Possible values are:
> # - 'single' single-tree context, no tree name (implicit)
> # - 'host' one host per tree
> # - 'prefix' generic host prefixed with tree name
> # - 'section' one section per tree (to be handled through symbolic
> # links or duplication)
> # - 'embedded' tree name embedded in section path
> # - 'argument' first argument is tree name [PREFERRED]
> # CAUTION!
> # Changing this parameter after initial configuration may
> # require adjustements to other parameters!
>
> 'routing' => 'argument'
>
> # Auxiliary tools subsection #
> #============================#
>
> , 'tmpdir' => '/tmp'
>
> , 'glimpsebin' => '/usr/local/bin/glimpse'
> , 'glimpseindex' => '/usr/local/bin/glimpseindex'
> , 'glimpsedirbase' => '/usr/local/db/glimpse'
> #@U , 'swishbin' => '%swish%'
> #@U , 'swishdirbase' => '%swishdirbase%'
> , 'swishconf' => '/usr/local/share/lxr/templates/swish-e.conf'
>
> , 'ectagsbin' => '/usr/bin/ctags'
> , 'ectagsconf' => '/usr/local/share/lxr/templates/ectags.conf'
>
> , 'cvspath' => '/bin:/usr/local/bin:/usr/bin:/usr/sbin'
> , 'gitpath' => '/bin:/usr/local/bin:/usr/bin:/usr/sbin'
> , 'hgpath' => '/bin:/usr/local/bin:/usr/bin:/usr/sbin'
> , 'svnpath' => '/bin:/usr/local/bin:/usr/bin:/usr/sbin'
>
> # Path to "magic" file to guess file content
> # CAUTION!
> # This is a Fedora path; may be different under
> # other distributions.
> # # # BUG # # #
> # A bug in File::MMagic version 1.27 prevents from using this
> # system magic file because it starts with a newline.
> # Parameter is commented out. Your alternate choice is:
> # 1) remove the initial offending empty lines,
> # 2) use another file without initial blank lines,
> # 3) default to the old magic file shipping with the release,
> # 4) work without any magic file to revert to internal tables.
> # , 'magicmime' => '/usr/share/misc/magic'
>
> # Computer DNS names subsection #
> #================================
> , 'host_names' => [ 'http://localhost'
> # Put here aliases for host name, such as
> # , '//localhost'
> # , 'https://192.168.1.1'
> # , 'http://mycomputer.outside.domain:12345'
> ]
>
> # HTML subsection #
> #=================#
>
> # All paths in this subsection are relative to LXR root directory
>
> # Templates used for headers and footers
> , 'htmlfatal' => '/usr/local/share/lxr/templates/html/html-fatal.html'
> , 'htmlhead' => '/usr/local/share/lxr/templates/html/html-head-btn.html'
> , 'htmltail' => '/usr/local/share/lxr/templates/html/html-tail.html'
> , 'htmldir' => '/usr/local/share/lxr/templates/html/html-dir-indexing.html'
> # If you do not need the "last indexed" column in directory
> # display (e.g. for a stable unchanging tree), erase the
> # '-indexing' suffix above.
> , 'htmlident' => '/usr/local/share/lxr/templates/html/html-ident.html'
> , 'htmlsearch' => '/usr/local/share/lxr/templates/html/html-search-glimpse.html'
> , 'htmlconfig' => '/usr/local/share/lxr/templates/html/html-config.html'
>
> # htmlhead and htmltail can be customised for the various
> # LXR operations. Just replace html by source (listing file),
> # sourcedir (displaying directory), diff (difference markup),
> # ident (identifier search), search (free-text search)
> # as below (which changes nothing):
> # , 'sourcehead' => '/usr/local/share/lxr/templates/html/html-head.html'
> # , 'sourcedirhead' => '/usr/local/share/lxr/templates/html/html-head.html'
>
> # showconfig script is a bit special since "version" has
> # no meaning for it. Better to wipe out the 'variables' selection
> # links with an adequate header:
> , 'showconfighead' => '/usr/local/share/lxr/templates/html/config-head-btn-smaller.html'
>
> # Default character width of left version (for diff)
> , 'diffleftwidth' => 50
>
> # Default identifier search constraint (for ident)
> # , 'identdefonly' => 1
>
> # CSS style sheet
> , 'stylesheet' => 'templates/lxr.css'
> , 'alternate_stylesheet' => [ 'templates/classic.css' ]
>
> # Default character encoding
> , 'encoding' => 'utf-8'
>
> # File management subsection #
> #============================#
>
> # Which files should be excluded from indexing (and display).
> , 'ignorefiles' =>
> '^\\.|~$|\\.(o|a|orig)$|^CVS$|^core$'
> # Which extensions to treat as images when browsing. If a file is an image,
> # it is displayed.
> , 'graphicfile' =>
> 'bitmap|bmp|gif|icon?|jp2|jpe?g|pjpe?g|png|svg|tiff?|xbm|xpm'
>
> # Which file extensions are associated with which icon
> # Below is an example using 'Oxygen' theme available with KDE
> # small-icons/ is a symbolic link to
> # /usr/share/icons/oxygen/22x22/
> # (This location is valid for Fedora distributions,
> # check for others)
> # , 'iconfolder' => 'small-icons/'
> # Don't forget the final / above.
> # , 'icons' =>
> # { '[gm]?awk' => 'mimetypes/application-x-awk.png'
> # , 'c|pc' => 'mimetypes/text-x-csrc.png'
> # , 'h|hh' => 'mimetypes/text-x-chdr.png'
> # , 'c\+\+|cc|cpp|cxx' => 'mimetypes/text-x-c++src.png'
> # , 'hpp|hxx|h\+\+' => 'mimetypes/text-x-c++hdr.png'
> # , 'java' => 'mimetypes/text-x-java.png'
> # , 'js' => 'mimetypes/application-x-javascript.png'
> # , 'ma?k' => 'mimetypes/text-x-makefile.png'
> # , 'plx?|pm|perl' => 'mimetypes/application-x-perl.png'
> # , 'php3?|phtml' => 'mimetypes/application-x-php.png'
> # , 'py|python|px' => 'mimetypes/text-x-python.png'
> # , 'sh|ba?sh|ksh|zsh|m4' => 'mimetypes/text-x-script.png'
> # , 's?html?' => 'mimetypes/text-html.png'
> # , 'css' => 'mimetypes/text-css.png'
> # , 'p|pas' => 'mimetypes/text-x-pascal.png'
> # , 'patch' => 'mimetypes/text-x-patch.png'
> # , 'pdf' => 'mimetypes/application-pdf.png'
> # , 'sql|pk(s|b)' => 'mimetypes/text-x-sql.png'
> # , 'rb|ruby' => 'mimetypes/application-x-ruby.png'
> # , 'txt' => 'mimetypes/text-plain.png'
> # , 'ui' => 'mimetypes/text-xml.png'
> # , '.*\~' => 'mimetypes/application-x-trash'
> # }
> # , 'graphicicon' => 'mimetypes/image-x-generic.png'
> # , 'defaulticon' => 'mimetypes/unknown.png'
> # , 'diricon' => 'mimetypes/inode-directory.png'
> # , 'parenticon' => 'actions/go-up.png'
>
> , 'filetypeconf' => '/usr/local/share/lxr/templates/filetype.conf'
>
> , 'genericconf' => '/usr/local/share/lxr/lib/LXR/Lang/generic.conf'
>
> # "Common factor" subsection #
> #============================#
>
> # In case your LXR installation controls several trees,
> # put here what you consider common parameters between
> # your source trees.
> # A parameter is "common" if its value must be simultaneously
> # adjusted in every tree.
>
> # Virtual root shared by all trees (or hosts)
> , 'virtroot' => '/lxr'
>
> # Pattern for extracting tree name from URL, since all
> # trees are usually served from the same physical server.
> # Meaningful only in multiple trees context. Example for
> # built-in method where tree id is last before script name
> # , 'treeextract' => '([^/]*)/[^/]*$'
>
> , 'dbuser' => 'lxr'
> , 'dbpass' => 'lxrpw'
> , 'dbprefix' => 'lxr_'
> }
>
> # ------------------------------------------------------------------------
>
> ###############################
> # Tree configuration sections #
> ###############################
>
> # ------------------------------------------------------------------------
> , {
>
> # Server configuration subsection #
> #=================================#
>
>
>
> 'caption' => 'Linux Kernel'
> , 'shortcaption' => 'Kernel'
>
> , 'treename' => 'lxr'
>
> # a link of the form (prefix)($filepath)(postfix) is generated when viewing a file
> # example for cvsweb:
> # , 'cvswebprefix' => 'http://cvs.myhost.com/cgi-bin/cvsweb.cgi'
> # , 'cvswebpostfix' => '?cvsroot=rootname'
> # example for viewcvs:
> # , 'cvswebprefix' => 'http://cvs.myhost.com/cgi-bin/viewcvs.cgi/myroot'
> # , 'cvswebpostfix' => ''
>
> # Tree location subsection #
> #==========================#
>
> # sourceroot - where to get the source files from
>
> , 'sourceroot' => '/home/eulfsam/projects/LXR'
>
> # The string to display as the base part of every path in the tree
> , 'sourcerootname' => '$v'
>
> # Version selection subsection #
> #==============================#
>
> , 'variables' =>
>
> # Define typed variable "v".
> { 'v' =>
> { 'name' => 'Version'
> # This is the list of versions to index.
> , 'range' => [qw(
> vlmctrl
> )]
> # The default version to display
> # If not specified, first in 'range' used
> # , 'default' => 'v3.1'
> }
>
> # Other variables may be defined for use by rewrite rules
> # in the subdirectory section.
> # These variable definitions are needed for Linux kernel
> # browsing. Read carefully the User's Manual.
> # Alternately, use template lxrkernel.conf dedicated to kernel
> # configuration.
> }
>
> # Subdirectory subsection #
> #=========================#
>
> # Tree-specific files to ignore (in every directory of the tree)
> # Extend and uncomment the following copy of the global
> # parameter to override:
> # , 'ignorefiles' =>
> # '^\\.|~$|\\.(o|a|orig)$|^CVS$|^core$'
>
> # Directories to always ignore. These usually are the SCM's
> # private directories which possibly may contain non-public
> # project history. Note that .xxx directories are hidden
> # by an internal hard-coded rule. Redundant example:
> # , 'ignoredirs' => ['CVSROOT', 'CVS', '.git']
> , 'ignoredirs' => [qw(
> .git
> )]
>
> # Where to look for include files inside the sourcetree.
> # This is used to hyperlink to included files. Example:
> , 'incprefix' => [qw(
> /include
> /include/linux
> )]
>
> # These do funky things to paths in the system - you probably don't need them.
> # They are used to simulate compiler behaviour to various options
> # to rewrite short paths from (#)include statement and get the
> # real "physical" path to the file.
> # , 'maps' => # $a means substitute with current value of variable 'a'
> # [ '/include/asm[^\/]*/' => '/include/asm-$a/'
> # , '/arch/[^\/]+/' => '/arch/$a/'
> # ],
>
> # Having a fully functional set of 'incprefix'/'maps' directives
> # for the kernel is not a trivial task. It requires defining many
> # auxiliary variables which are dependent on the current development
> # state of the kernel.
> # Use template lxrkernel.conf.
>
> # Data storage subsection #
> #=========================#
>
> # The DBI identifier for the database to use
> # For MySQL, the format is dbi:mysql:dbname=<name>
> # for Postgres, it is dbi:Pg:dbname=<name>;host=localhost
> # for Oracle, it is dbi:Oracle:host=localhost;sid=DEVMMS;port=1521
> # for SQLite, it is dbi:SQLite:dbname=<filename>
> , 'dbname' => 'dbi:mysql:dbname=wrl60'
> # If you need to specify the username or password for the database connection,
> # uncomment the following two lines
> # , 'dbuser' => 'lxr'
> # , 'dbpass' => 'lxrpw'
>
> # If you need multiple lxr configurations in one database, set different table
> # prefixes for them.
> # , 'dbprefix' => 'lxr_'
>
> # The following two parameters are now automatically
> # generated from 'glimpsedirbase' or 'swishdirbase' and
> # 'virtroot'.
> # They may nevertheless be overridden here by uncommenting
> # them and filling-in an appropriate absolute path.
> # For using glimpse, the directory to store the .glimpse files in is required
> # , 'glimpsedir' => '/path/to/glimpse/databases'
> # Location of swish-e index database files if using swish-e
> # , 'swishdir' => '/path/to/swish/databases'
> }
>
> #@here_tree:
> )
> ==================================================================================
> .htaccess
>
> #
> # Web server configuration for LXR root directory
> #
> # Content of this file is independent of the location of
> # the LXR root directory.
> # Need for user-customization should be very limited.
> # Eventually, access to LXR root directory can be relaxed.
> # Default is very restrictive.
> #
>
>
> # Enable CGI script execution and use of symlinks
> Options ExecCGI FollowSymlinks
>
> <IfModule mod_version.c>
> <IfVersion < 2.4>
> Order deny,allow
> </IfVersion>
> </IfModule>
> <IfModule !mod_version.c>
> <IfModule !mod_authz_core.c>
> Order deny,allow
> </IfModule>
> </IfModule>
>
> # =================================================
> #
> # ----------- Access restrictions -----------
> #
>
> # Do not allow to list directories content
> # NOTE: remove - sign when debugging LXR installation so that you
> # can see what's really in the directories.
> Options -Indexes
>
> # Forbid direct access to any file in LXR root and its subdirectories
> <FilesMatch ".">
> <IfModule mod_version.c>
> <IfVersion < 2.4>
> Deny from all
> </IfVersion>
> <IfVersion >= 2.4>
> Require all denied
> </IfVersion>
> </IfModule>
> <IfModule !mod_version.c>
> <IfModule !mod_authz_core.c>
> Deny from all
> </IfModule>
> <IfModule mod_authz_core.c>
> Require all denied
> </IfModule>
> </IfModule>
> </FilesMatch>
>
> # But allow access to style sheets
> <FilesMatch "\.css$">
> <IfModule mod_version.c>
> <IfVersion < 2.4>
> Allow from all
> </IfVersion>
> <IfVersion >= 2.4>
> Require all granted
> </IfVersion>
> </IfModule>
> <IfModule !mod_version.c>
> <IfModule !mod_authz_core.c>
> Allow from all
> </IfModule>
> <IfModule mod_authz_core.c>
> Require all granted
> </IfModule>
> </IfModule>
> </FilesMatch>
> # and graphic files (for icons)
> <FilesMatch "\.(bmp|gif|icon?|jpe?g|png|svg|tiff?)$">
> <IfModule mod_version.c>
> <IfVersion < 2.4>
> Allow from all
> </IfVersion>
> <IfVersion >= 2.4>
> Require all granted
> </IfVersion>
> </IfModule>
> <IfModule !mod_version.c>
> <IfModule !mod_authz_core.c>
> Allow from all
> </IfModule>
> <IfModule mod_authz_core.c>
> Require all granted
> </IfModule>
> </IfModule>
> </FilesMatch>
>
>
> # =================================================
> #
> # ----------- LXR scripts configuration -----------
> #
> #
> <Files ~ (search|source|ident|diff|showconfig)$>
> <IfModule mod_version.c>
> <IfVersion < 2.4>
> Allow from all
> </IfVersion>
> <IfVersion >= 2.4>
> Require all granted
> </IfVersion>
> </IfModule>
> <IfModule !mod_version.c>
> <IfModule !mod_authz_core.c>
> Allow from all
> </IfModule>
> <IfModule mod_authz_core.c>
> Require all granted
> </IfModule>
> </IfModule>
> # Access granted to everybody
>
> # *** mod_perl use ***
> <IfModule mod_perl.c>
> SetHandler perl-script
>
> # Configuration parameters changed between mod_perl versions:
> <IfDefine MODPERL2>
> PerlOptions +ParseHeaders
> # Apache can dispatch execution according to 2 modes.
> # mod_perl initialization differs slightly:
> <IfModule prefork.c>
> PerlHandler ModPerl::RegistryPrefork
> </IfModule>
> <IfModule worker.c>
> PerlHandler ModPerl::Registry
> </IfModule>
> </IfDefine>
>
> <IfDefine !MODPERL2>
> PerlSendHeader On
> PerlHandler Apache::Registry
> </IfDefine>
>
> </IfModule>
>
> # *** CGI use ***
> <IfModule !mod_perl.c>
> SetHandler cgi-script
> </IfModule>
>
> </Files>
> ==================================================================================
> apache-lxrserver.conf
>
> #
> # LXR Apache server configuration
> #
>
> # =================================================
> # ------- Port list -------
> #
> # (only if different from 80, 8080 or 443)
> # NOTE: remove duplicate ports since they cause trouble
> # and uncomment the remaining ones.
>
> #@here_ports:
>
>
> #@here_hosts:
>
>
> # =================================================
> #
> # ------- URL mapping to LXR directory ------
> #
> Alias /lxr "/usr/local/share/lxr"
> #@here_alias:
>
>
> # =================================================
> #
> # ----------- Perl security checks -----------
> #
> # If these checks cause trouble (i.e. too many
> # error or warning messages in Apach#
> # LXR Apache server configuration
> #
>
> # =================================================
> # ------- Port list -------
> #
> # (only if different from 80, 8080 or 443)
> # NOTE: remove duplicate ports since they cause trouble
> # and uncomment the remaining ones.
>
> #@here_ports:
>
>
> #@here_hosts:
>
>
> # =================================================
> #
> # ------- URL mapping to LXR directory ------
> #
> Alias /lxr "/usr/local/share/lxr"
> #@here_alias:
>
>
> # =================================================
> #
> # ----------- Perl security checks -----------
> #
> # If these checks cause trouble (i.e. too many
> # error or warning messages in Apache's error log),
> # comment out the lines.
> <IfDefine MODPERL2>
> PerlSwitches -T
> </IfDefine>
> <IfDefine !MODPERL2>
> PerlTaintCheck On
> </IfDefine>
>
>
> # =================================================
> #
> # ----------- LXR startup configuration -----------
> #
> # This is valid only for Apache 2.x
> # Apache 1.x requires manual modification of Perl library.
> # See LXR installation manual
> <IfModule mod_version.c>
> # Assume Apache 2.x and above since mod_version appeared in 2.0
> # This is safer than using <IfVersion> since this tag
> # causes an error with 1.x
> # However, when this configuration file is parsed,
> # mod_perl may not yet be loaded; consequently, the older
> # directive is used. Happily, it is still recognised by newer
> # versions of mod_perl.
> <IfDefine MODPERL2>
> # ----------------> absolute path to the LXR root directory
> PerlPostConfigRequire /usr/local/share/lxr/custom.d/apache2-require.pl
> </IfDefine>
> <IfDefine !MODPERL2>
> # ----------------> absolute path to the LXR root directory
> PerlRequire /usr/local/share/lxr/custom.d/apache2-require.pl
> </IfDefine>
> </IfModule>
>
>
>
> # =================================================
> #
> # ----------- LXR directory access -----------
> #
> # ----------------> absolute path to the LXR root directory
> <Directory "/usr/local/share/lxr">
> Options FollowSymLinks
> AllowOverride AuthConfig FileInfo Limit Options
> <IfModule mod_version.c>
> <IfVersion < 2.4>
> Order allow,deny
> Allow from all
> </IfVersion>
> <IfVersion >= 2.4>
> Require all granted
> </IfVersion>
> </IfModule>
> <IfModule !mod_version.c>
> <IfModule !mod_authz_core.c>
> Order allow,deny
> Allow from all
> </IfModule>
> <IfModule mod_authz_core.c>
> Require all granted
> </IfModule>
> </IfModule>
> </Directory>e's error log),
> # comment out the lines.
> <IfDefine MODPERL2>
> PerlSwitches -T
> </IfDefine>
> <IfDefine !MODPERL2>
> PerlTaintCheck On
> </IfDefine>
>
>
> # =================================================
> #
> # ----------- LXR startup configuration -----------
> #
> # This is valid only for Apache 2.x
> # Apache 1.x requires manual modification of Perl library.
> # See LXR installation manual
> <IfModule mod_version.c>
> # Assume Apache 2.x and above since mod_version appeared in 2.0
> # This is safer than using <IfVersion> since this tag
> # causes an error with 1.x
> # However, when this configuration file is parsed,
> # mod_perl may not yet be loaded; consequently, the older
> # directive is used. Happily, it is still recognised by newer
> # versions of mod_perl.
> <IfDefine MODPERL2>
> # ----------------> absolute path to the LXR root directory
> PerlPostConfigRequire /usr/local/share/lxr/custom.d/apache2-require.pl
> </IfDefine>
> <IfDefine !MODPERL2>
> # ----------------> absolute path to the LXR root directory
> PerlRequire /usr/local/share/lxr/custom.d/apache2-require.pl
> </IfDefine>
> </IfModule>
>
>
>
> # =================================================
> #
> # ----------- LXR directory access -----------
> #
> # ----------------> absolute path to the LXR root directory
> <Directory "/usr/local/share/lxr">
> Options FollowSymLinks
> AllowOverride AuthConfig FileInfo Limit Options
> <IfModule mod_version.c>
> <IfVersion < 2.4>
> Order allow,deny
> Allow from all
> </IfVersion>
> <IfVersion >= 2.4>
> Require all granted
> </IfVersion>
> </IfModule>
> <IfModule !mod_version.c>
> <IfModule !mod_authz_core.c>
> Order allow,deny
> Allow from all
> </IfModule>
> <IfModule mod_authz_core.c>
> Require all granted
> </IfModule>
> </IfModule>
> </Directory>
> ==================================================================================
> /usr/local/db/glimpse$ ls -l
> total 4
> drwxrwxrwx 3 eulfsam rnd 4096 May 27 16:15 lxr
>
> ==================================================================================
> ~/projects/LXR $ ls
> vlmctrl
> ~/projects/LXR $
>
>
> --
> Best Regards
> Ulf Samuelsson
> ulf...@er...
> +46 722 427 437
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
>
>
> _______________________________________________
> Lxr-general mailing list
> Lxr...@li...
> https://lists.sourceforge.net/lists/listinfo/lxr-general
|