mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-16 22:10:26 +00:00
Support Apache 2.2 and 2.4.
This commit is contained in:
parent
d423a8b1af
commit
64d3c31499
9 changed files with 82 additions and 23 deletions
|
|
@ -2,24 +2,39 @@
|
|||
|
||||
WSGIScriptAlias /lconlinewsgi/lc.wsgi /usr/lib/cgi-bin/lc.wsgi
|
||||
|
||||
Alias /lconline/ /usr/share/linkchecker/lconline/
|
||||
Alias /lconline /usr/share/linkchecker/lconline
|
||||
# allow people to read the files
|
||||
<Directory "/usr/share/linkchecker/lconline/">
|
||||
Options Indexes MultiViews
|
||||
AllowOverride None
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
<Directory "/usr/share/linkchecker/lconline">
|
||||
Options Indexes MultiViews
|
||||
<IfVersion >= 2.3>
|
||||
Require local
|
||||
</IfVersion>
|
||||
<IfVersion < 2.3>
|
||||
Order deny,allow
|
||||
Deny from all
|
||||
Allow from 127.0.0.0/255.0.0.0
|
||||
# Before uncommenting the following lines please put IP address
|
||||
# of your computer in the Allow line
|
||||
# Allow from REPLACE-WITH.YOUR-HOST.IP-ADDRESS
|
||||
# IPv6 addresses work only with apache2
|
||||
Allow from ::1/128
|
||||
</IfVersion>
|
||||
</Directory>
|
||||
|
||||
<Location "/lconlinewsgi/lc.wsgi">
|
||||
Order deny,allow
|
||||
Deny from all
|
||||
Allow from 127.0.0.0/255.0.0.0
|
||||
<IfVersion >= 2.3>
|
||||
Require local
|
||||
</IfVersion>
|
||||
<IfVersion < 2.3>
|
||||
Order deny,allow
|
||||
Deny from all
|
||||
Allow from 127.0.0.0/255.0.0.0
|
||||
# Before uncommenting the following lines please put IP address
|
||||
# of your computer in the Allow line
|
||||
# Allow from REPLACE-WITH.YOUR-HOST.IP-ADDRESS
|
||||
# Allow from REPLACE-WITH.YOUR-HOST.IP-ADDRESS
|
||||
# IPv6 addresses work only with apache2
|
||||
Allow from ::1/128
|
||||
Allow from ::1/128
|
||||
</IfVersion>
|
||||
</Location>
|
||||
|
||||
</IfModule>
|
||||
|
|
|
|||
6
debian/README.Debian.web
vendored
6
debian/README.Debian.web
vendored
|
|
@ -1,12 +1,10 @@
|
|||
Web Interface
|
||||
==============
|
||||
The web interface can be configured with
|
||||
- executing "sudo a2enmod negotiation"
|
||||
- accessing http://localhost/lconline/
|
||||
The web interface is at http://localhost/lconline/
|
||||
|
||||
If you want to access to web interface from other
|
||||
computers, add their IP addresses in the file
|
||||
/etc/apache2/conf.d/linkchecker
|
||||
/etc/apache2/conf-available/linkchecker.conf
|
||||
|
||||
There is a default maximum check time of 5 minutes
|
||||
per request. After that, checking will be aborted.
|
||||
|
|
|
|||
2
debian/linkchecker-web.dirs
vendored
2
debian/linkchecker-web.dirs
vendored
|
|
@ -1,3 +1,3 @@
|
|||
etc/apache2/conf.d
|
||||
etc/apache2/conf-available
|
||||
usr/lib/cgi-bin
|
||||
usr/share/linkchecker/lconline
|
||||
|
|
|
|||
22
debian/linkchecker-web.postinst
vendored
22
debian/linkchecker-web.postinst
vendored
|
|
@ -14,9 +14,27 @@ esac
|
|||
|
||||
#DEBHELPER#
|
||||
|
||||
# reload apache configuration
|
||||
if [ "$1" = "configure" -a -x /etc/init.d/apache2 ]; then
|
||||
if [ "$1" = "configure" ]; then
|
||||
|
||||
CONF=linkchecker
|
||||
|
||||
if [ -e /usr/share/apache2/apache2-maintscript-helper ]; then
|
||||
# apache 2.4
|
||||
. /usr/share/apache2/apache2-maintscript-helper
|
||||
apache2_invoke enconf $CONF
|
||||
elif dpkg-query -f '${Version}' -W 'apache2.2-common' >/dev/null 2>&1; then
|
||||
# apache 2.2
|
||||
# the configuration uses <IfVersion>
|
||||
a2enmod -q version
|
||||
# the web interface uses content negotiation
|
||||
a2enmod -q negotiation
|
||||
[ -d /etc/apache2/conf.d/ ] && [ ! -L /etc/apache2/conf.d/$CONF.conf ] && ln -s ../conf-available/$CONF.conf /etc/apache2/conf.d/$CONF.conf
|
||||
fi
|
||||
|
||||
# reload apache configuration
|
||||
if [ -x /etc/init.d/apache2 ]; then
|
||||
invoke-rc.d apache2 reload || true
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
|
|
|||
21
debian/linkchecker-web.postrm
vendored
Normal file
21
debian/linkchecker-web.postrm
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh -e
|
||||
# postrm script for linkchecker-web
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
|
||||
CONF="linkchecker"
|
||||
|
||||
if [ -e /usr/share/apache2/apache2-maintscript-helper ]; then
|
||||
# apache 2.4
|
||||
. /usr/share/apache2/apache2-maintscript-helper
|
||||
apache2_invoke disconf $CONF
|
||||
elif dpkg-query -f '${Version}' -W 'apache2.2-common' > /dev/null 2>&1; then
|
||||
# apache 2.2
|
||||
[ -L /etc/apache2/conf.d/$CONF.conf ] && rm /etc/apache2/conf.d/$CONF.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
2
debian/linkchecker.postinst
vendored
2
debian/linkchecker.postinst
vendored
|
|
@ -24,6 +24,8 @@ fi
|
|||
dpkg-maintscript-helper rm_conffile /etc/linkchecker/linkcheckerrc 6.9 -- "$@"
|
||||
# remove system conffile for versions >= 7.4
|
||||
dpkg-maintscript-helper rm_conffile /etc/linkchecker/logging.conf 7.3 -- "$@"
|
||||
# remove system conffile for versions >= 7.7
|
||||
dpkg-maintscript-helper rm_conffile /etc/apache2/conf.d/linkchecker 7.7 -- "$@"
|
||||
|
||||
|
||||
#DEBHELPER#
|
||||
|
|
|
|||
11
debian/linkchecker.postrm
vendored
11
debian/linkchecker.postrm
vendored
|
|
@ -19,14 +19,17 @@
|
|||
#DEBHELPER#
|
||||
|
||||
if [ "$1" = "purge" ]; then
|
||||
# remove old conf file generated by previous updates
|
||||
if [ -f /etc/linkchecker/linkcheckerrc.old ]; then
|
||||
rm -f /etc/linkchecker/linkcheckerrc.old
|
||||
fi
|
||||
# remove old conf file generated by previous updates
|
||||
if [ -f /etc/linkchecker/linkcheckerrc.old ]; then
|
||||
rm -f /etc/linkchecker/linkcheckerrc.old
|
||||
fi
|
||||
fi
|
||||
|
||||
# remove system conffile for versions >= 7.0
|
||||
dpkg-maintscript-helper rm_conffile /etc/linkchecker/linkcheckerrc 6.9 -- "$@"
|
||||
# remove system conffile for versions >= 7.4
|
||||
dpkg-maintscript-helper rm_conffile /etc/linkchecker/logging.conf 7.3 -- "$@"
|
||||
# remove system conffile for versions >= 7.7
|
||||
dpkg-maintscript-helper rm_conffile /etc/apache2/conf.d/linkchecker 7.7 -- "$@"
|
||||
|
||||
exit 0
|
||||
|
|
|
|||
2
debian/linkchecker.preinst
vendored
2
debian/linkchecker.preinst
vendored
|
|
@ -30,6 +30,8 @@ esac
|
|||
dpkg-maintscript-helper rm_conffile /etc/linkchecker/linkcheckerrc 6.9 -- "$@"
|
||||
# remove system conffile for versions >= 7.4
|
||||
dpkg-maintscript-helper rm_conffile /etc/linkchecker/logging.conf 7.3 -- "$@"
|
||||
# remove system conffile for versions >= 7.7
|
||||
dpkg-maintscript-helper rm_conffile /etc/apache2/conf.d/linkchecker 7.7 -- "$@"
|
||||
|
||||
|
||||
exit 0
|
||||
|
|
|
|||
2
debian/rules
vendored
2
debian/rules
vendored
|
|
@ -46,7 +46,7 @@ override_dh_auto_install:
|
|||
install -m 644 cgi-bin/lconline/*.ico $(HTMLDIRWEB)
|
||||
install -m 755 cgi-bin/lc.wsgi $(CGIDIRWEB)
|
||||
# apache configuration
|
||||
install -m 644 config/linkchecker.apache2.conf $(ETCDIRWEB)/apache2/conf.d/linkchecker
|
||||
install -m 644 config/linkchecker.apache2.conf $(ETCDIRWEB)/apache2/conf-available/linkchecker.conf
|
||||
|
||||
# clean generated files
|
||||
override_dh_clean:
|
||||
|
|
|
|||
Loading…
Reference in a new issue