Bug#401903: should not ship /etc/apache2/sites-available/tetex-doc
Hi Frank,
Frank Küster wrote:
> Uwe Kleine-Koenig <zeisberg@informatik.uni-freiburg.de> wrote:
>
> >> > Moreover both URL that are mentioned in that file don't work for me:
> >> >
> >> > wget -q -O - http://localhost/doc/tetex-doc/texdoc.php
> >> >
> >> > gets the php-script uninterpreted. Probably the file should be guarded
> >> > by <IfModule php> or something like that?
> >>
> >> No idea. It does work here, but I don't know what I changed. I
> >> remember having problems with this, but I also seem to remember that
> >> they resolved themselves by restarting both server and browser.
> > Probably you have libapache-mod-php4 (or libapache-mod-php5) installed?
> > I have not.
>
> These packages (actually those for apache2) are only Suggested. Should
> we move this to Recommends?
I wouldn't do that. In my eyes Suggested is fine.
Now I created the file /etc/apache2/conf.d/tetex-doc with the following
content:
# This is used for the web-based php version of texdoctk
# just try
# http://localhost/texmf-tetex/doc/texdoc.php or
# http://localhost/doc/tetex-doc/texdoc.php
#
<IfModule mod_php5.c>
Alias /texmf /usr/share/texmf
<Directory /usr/share/texmf>
Options Indexes MultiViews FollowSymlinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
Alias /texmf-tetex /usr/share/texmf-tetex
<Directory /usr/share/texmf-tetex>
Options Indexes MultiViews FollowSymlinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</IfModule>
IMHO this is not optimal, but better than it is now.
There are still a few questions/issues open for me:
1) are really both Alias+<Directory> Directives needed?
`-> On http://localhost/texmf-tetex/doc/texdoc.php, the entry
"KOMA-Script User's Guide" links to
http://localhost/texmf/doc/latex/koma-script/scrguien.pdf.gz while
"ConTeXt: TeXEXEC manual" points to
http://localhost/texmf-tetex/context/base/mtexexec.pdf
(BTW: That file doesn't exist, in version 2.0.2-9 of tetex-doc
/usr/share/doc/texmf/context/base/mtexexec.pdf.gz was included.)
2) The whole thing needs to be duplicated once more for
<IfModule mod_php4.c>
...
</IfModule>
3) If php[45] is not installed (or disabled)
http://localhost/doc/tetex-doc/texdoc.php still shows the
php-source. Don't know if that's OK.
4) Maybe you should consider something like:
if test -e /etc/apache2/mods-enabled/php5.load ||
test -e /etc/apache2/mods-enabled/php4.load; then
if apache2ctl configtest 2>/dev/null; then
invoke-rc.d apache2 force-reload || true
else
echo "Your apache2 configuration is broken, so we're not restarting it for you."
fi
fi
(stolen from libapache2-mod-php5.postinst)
Best regards
Uwe
--
Uwe Kleine-Koenig
http://www.google.com/search?q=e+%5E+%28i+pi%29
Reply to: