Thread: Re: [Lxr-general] Re : LXR: Apache configuration problem on Ubuntu-14.04 derivative
Brought to you by:
ajlittoz
From: Ulf S. <ulf...@er...> - 2016-05-27 07:44:31
|
Best Regards Ulf Samuelsson ulf...@er... +46 722 427 437 On 05/26/2016 05:01 PM, andre-littoz wrote: > Hi Ulf, > > Very strange, I can't find your post in lxr-general. I correctly receive it as an alert in my private mailbox, but I don't see it in the LXR SourceForge project. I certainly received a mail through lxr...@li... > Anyway, I'll answer from my e-mail agent, which do not allow for sophisticated editing. > > What is strange in your log is the diagnostic about PHP. In its present form, LXR uses Perl. I guess then you have a "complex" site on your local machine, some part of it using PHP scripts. If I remember right, php5-fpm is related to FastCGI (for PHP scripts). One again, LXR do not need it because it runs either as a [standard] CGI script or under mod_perl. My site only contained a more or less vanilla Apache2 installation before installing LXR. I.E: "/var/www/html/index.html" and nothing more. I did install phpbb5 and MediaWiki packages I installed php5-fpm because some web site recommended this as a solution to the problem. It occured before that. Here is my setup (/etc/apache2 with *-available filtered away) ./conf-enabled/other-vhosts-access-log.conf ./conf-enabled/apache-lxrserver.conf ./conf-enabled/phpbb3.conf ./conf-enabled/localized-error-pages.conf ./conf-enabled/javascript-common.conf ./conf-enabled/security.conf ./conf-enabled/charset.conf ./conf-enabled/serve-cgi-bin.conf ./conf-enabled ./magic ./mods-enabled/deflate.load ./mods-enabled/authn_file.load ./mods-enabled/php5.conf ./mods-enabled/alias.conf ./mods-enabled/mime.load ./mods-enabled/dir.load ./mods-enabled/mime.conf ./mods-enabled/access_compat.load ./mods-enabled/mpm_worker.conf ./mods-enabled/status.load ./mods-enabled/authn_core.load ./mods-enabled/mpm_worker.load ./mods-enabled/negotiation.conf ./mods-enabled/perl.load ./mods-enabled/authz_user.load ./mods-enabled/auth_basic.load ./mods-enabled/status.conf ./mods-enabled/filter.load ./mods-enabled/php5.load./conf-enabled/other-vhosts-access-log.conf ./conf-enabled/apache-lxrserver.conf ./conf-enabled/phpbb3.conf ./conf-enabled/localized-error-pages.conf ./conf-enabled/javascript-common.conf ./conf-enabled/security.conf ./conf-enabled/charset.conf ./conf-enabled/serve-cgi-bin.conf ./conf-enabled ./magic ./mods-enabled/deflate.load ./mods-enabled/authn_file.load ./mods-enabled/php5.conf ./mods-enabled/alias.conf ./mods-enabled/mime.load ./mods-enabled/dir.load ./mods-enabled/mime.conf ./mods-enabled/access_compat.load ./mods-enabled/status.load ./mods-enabled/authn_core.load ./mods-enabled/negotiation.conf ./mods-enabled/perl.load ./mods-enabled/mpm_prefork.load ./mods-enabled/authz_user.load ./mods-enabled/auth_basic.load ./mods-enabled/status.conf ./mods-enabled/filter.load ./mods-enabled/php5.load ./mods-enabled/autoindex.conf ./mods-enabled/authz_host.load ./mods-enabled/env.load ./mods-enabled/authz_core.load ./mods-enabled/negotiation.load ./mods-enabled/alias.load ./mods-enabled/autoindex.load ./mods-enabled/setenvif.conf ./mods-enabled/mpm_prefork.conf ./mods-enabled/deflate.conf ./mods-enabled/setenvif.load ./mods-enabled/dir.conf ./mods-enabled ./ports.conf ./conf.d/gitweb ./conf.d ./sites-enabled/000-default.conf ./sites-enabled/001-default.conf ./sites-enabled ./apache2.conf ./envvars ./mods-enabled/autoindex.conf ./mods-enabled/authz_host.load ./mods-enabled/env.load ./mods-enabled/authz_core.load ./mods-enabled/negotiation.load ./mods-enabled/alias.load ./mods-enabled/autoindex.load ./mods-enabled/setenvif.conf ./mods-enabled/deflate.conf ./mods-enabled/setenvif.load ./mods-enabled/dir.conf ./mods-enabled ./ports.conf ./conf.d/gitweb ./conf.d ./sites-enabled/000-default.conf ./sites-enabled/001-default.conf ./sites-enabled ./apache2.conf ./envvars After "a2dismod php5" I could start the apache2 server without the error message. service apache2 restart * Restarting web server apache2 AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message [ OK ] Still cannot access the web page. ======================================== Forbidden You don't have permission to access /lxr/ on this server. Apache/2.4.7 (Ubuntu) Server at localhost Port 80 ======================================== LXR is installed in /usr/local/share/lxr drwxr-xr-x 9 eulfsam support 4096 May 26 13:38 /usr/local/share/lxr drwxr-xr-x 11 root root 4096 May 26 13:24 /usr/local/share drwxr-xr-x 11 root root 4096 May 25 15:40 /usr/local drwxr-xr-x 19 root root 4096 May 11 14:56 /usr # # 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: # ================================================= # # ------- LXR host name and aliases ------ # <VirtualHost *> DocumentRoot /usr/local/share/lxr ServerName localhost </VirtualHost> #@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> > ** Could you check after temporarily disabling ypur PHP sites or sub-sites? > > modversion usage: > There are 2 references to modversion in apache-lxrserver.conf > > 1. mod_perl version detection to use the correct PerlRequire or PerlPostConfigRequire directive according to mod_perl level. > 2. access right to LXR directory: 2.2 and lower of 2.4 and higher Apache version, then use either Order/Deny or Require directive to set permissions. > > If you cannot solve the PHP issue, revert to your previous Apache configuration (probably as defined by the Ubuntu packages in their standard configuration) and manually edit apache-lxrserver.conf to remove the automatic conditional confiration and fix the settings for your own computer configuration. > > ** After this manual configuration, LXR no longer needs modversion and you can run your server without modversion. > > If this still does not work, I'd uggest for a test to install a light web server like thttpd (listening on a different port than Apache) and serve LXR through thttpd. The configuration process has created a thttpd-lxrserver.conf which you can find in custom.d/. Change or add a port=<port-number> directive to tell which port to listen to. See the comments in the file about the host directive and the directory and symbolic links to create. For more information, download the User's Manual and read section 1.8.e (taking care that you have two web servers running and you must give thttpd an id different from localhost or 127.0.0.1) or more thoroughly chapter 7 (more precisely 7.6 dedicated to thttpd). > > Tell if this helps. > > Regards, > André > > PS: Are you a Swede? > -------------------------------------------- > En date de : Jeu 26.5.16, Ulf Samuelsson <ulf...@er...> a écrit : > > Objet: [Lxr-general] LXR: Apache configuration problem on Ubuntu-14.04 derivative > À: lxr...@li... > Date: Jeudi 26 mai 2016, 14h14 > > Trying to get LXR-2.1.0 run to a customized Ubuntu-14.04 machine. > > Following "http://lxr.sourceforge.net/en/Tips/tipubuntu.php"to get the Apache running > > Have installed lxr in "/usr/local/share/lxr". > > Have generated an lxr.conf and created "apache-lxrserver.conf", which now resides in /etc/apache2/conf-available. > a2enconf apache-lxrserver.conf to enable it > a2enmod version > ERROR: Module version does not exist! > > sudo apt-get install apache2-mpm-worker > sudo a2dismod mpm* > sudo a2enmod mpm_worker > apache2ctl restart > > [Thu May 26 14:03:43.345256 2016] [:crit] [pid 15349:tid > 140446872770432] Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP. > AH00013: Pre-configuration failed > Action 'restart' failed. > > The Apache error log may have more information. > > apt-get install php5-fpm as recommended on some web-site did not help > > Any ideas? > > -- > Best Regards > Ulf Samuelsson |