...
- DaCHS repository
deb http://vo.ari.uni-heidelberg.de/debian stable main
deb-src http://vo.ari.uni-heidelberg.de/debian stable main
Fig. 3.1
Add the key to use the repository:
user@yourservername:~$ wget -qO - http://docs.g-vo.org/archive-key.asc | sudo apt-key add -
Get the latest debian packages:
user@yourservername:~$ sudo apt-get update
user@yourservername:~$ sudo apt-get upgrade
After these first steps, start the installation:
user@yourservername:~$ sudo apt-get install gavodachs-serverBasic DaCHS Configuration
We will use only a basic configuration for DaCHS, allowing Only the minimum for Dachs to work, port number, definition. The full configuration including registry is optional in the next paragraph
because we use dachs in a non common way:
user@yourservername:~$ sudo cp /var/gavo/etc/trustedquery /var/gavo/etc/untrustedquery
Create a file /etc/gavo.rc using your preferred editor (for instance pico):
user@yourservername:~$ sudo pico /etc/gavo.rc
Insert the following content in that file:
[general]
rootDir: /var/gavo
maintainerAddress: vo.paris@obspm.fr
[web]
bindAddress:
serverPort: 8080
serverURL: http://127.0.0.1
preloadRDs: rr/q
[ivoa]
authority: vopdc.obspm.fr
In this file, replace 127.0.0.1 by your server name and vopdc.obspm.fr by you own authority ID that you will create during the registration of your service. If this is not ready at this time, you may modify it later when your have registered your service with IVOA. replace vo.paris@obspm.fr by an email of technical maintainer of the service, use generic address if possible
Finally restart DaCHS server:
gavo serve restartAWStat Installation and Configuration
Install AWStats
apt-get install awstats
Configure AWStats to use apache log file combined www-yourservername_access.log in apache dir (define in next paragraph). Also eliminate queries comming from monitoring server nagios (145.238.187.13)
in /etc/awstats/ create awstats.yourservername.conf containing
LogFile="/var/log/apache2/www-yourservername_access.log.log"
LogType=W
LogFormat=4
LogSeparator=" "
SiteDomain="yoursservername.yourdomain"
HostAliases="www.myserver.com localhost 127.0.0.1 REGEX[mydomain\.(net|org)$]"
DNSLookup=1
DirData="/var/lib/awstats"
DirCgi="/cgi-bin"
DirIcons="/awstats-icon"
AllowToUpdateStatsFromBrowser=0
AllowFullYearView=2
EnableLockForUpdate=0
DNSStaticCacheFile="dnscache.txt"
DNSLastUpdateCacheFile="dnscachelastupdate.txt"SkipDNSLookupFor=""
AllowAccessFromWebToAuthenticatedUsersOnly=0
AllowAccessFromWebToFollowingAuthenticatedUsers=""
AllowAccessFromWebToFollowingIPAddresses=""
CreateDirDataIfNotExists=0
BuildHistoryFormat=text
BuildReportFormat=html
SaveDatabaseFilesWithPermissionsForEveryone=0
PurgeLogFile=0
ArchiveLogRecords=0
KeepBackupOfHistoricFiles=0
DefaultFile="index.php index.html"
SkipHosts="145.238.187.13"
SkipUserAgents=""
SkipFiles=""
SkipReferrersBlackList=""
OnlyHosts=""
OnlyUserAgents=""
OnlyUsers=""
OnlyFiles=""Apache Configuration
Apache should already be installed during initial configuration, otherwise :
apt-get install apache2
Install the mod_proxy_html module:
apt-get install libapache2-mod-proxy-html
Enable ModProxy:
a2enmod proxy proxy_http proxy_html
Edit the Apache default for using AWSTATS
pico /etc/apache2/sites-enabled/000-default.conf
just before </VirtualHost> add :ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
Options FollowSymLinks
AddHandler cgi-script .pl
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
Then you must configure apache to redirect yourservername2.domain.name to dachs that run on 8080 port. you must add a new config file in /etc/apache2/sites-enable yourservername2.conf containing
<VirtualHost yourservername2.domain.name:80>
ServerAdmin pierre.lesidaner@obspm.fr
ServerName yourservername2.domain.name
ServerAlias yourservername2
ProxyRequests off
<Location />
ProxyPass http://localhost:8080/
ProxyPassReverse http://localhost:8080/
</Location>
ErrorLog ${APACHE_LOG_DIR}/www-yourservername_error.log
CustomLog ${APACHE_LOG_DIR}/www-yourservername_access.log combined
</VirtualHost>
...