Monday, January 16, 2012

configuring voxel server for sgh and h2h

This is an ongoing process, started on 10 Dec 2011.
  1. adduser username
  2. apt-get install vsftpd
  3. Disabled ssh with password using the procedure in the earlier post, copying required keys to .ssh/authorized_keys
  4. Started copy process with sftp  from colinux, running under screen from saiwaves.
  5. Enabled vsftpd -
    service vsftpd start
    To make it useful, had to enable ftp write by
    vim /etc/vsftpd.conf
    and un-commenting the line
    write_enable = YES
  6. Also, added username1 user to /etc/ftpusers - so username1 is not allowed to ftp (only username2 is allowed to ftp)
  7. Copied over the entire web folder from old server. Tried this first with Windows Explorer's built-in ftp, but was taking too long - several days - and breaking too often. So did it with Filezilla and completed in 10-15 hours.
  8. Made postfix work: it was giving the error 
    send-mail: fatal: open /etc/postfix/main.cf: No such file or directory
    Can't send mail: sendmail process failed with error code 75

    Solution was, as given here, dpkg-reconfigure postfix
  9. Fixed the ices error Cannot use config file (no XML support). by doing
    apt-get install libxml*and then recompiling ices
  10. Worked out why and how the metadata is not sent for our shoutcast streams by ices: the song info is not displayed if the SrcIP=ANY and DestIP=127.0.0.1 and the ices connects on an address other than 127.0.0.1. Basically, song metadata is not sent if the ip on which ices connects does not have a route to one of the ips in DestIP. 
  11. For ices not to show the filenames for icecast server, the above trick does not work. Also, the method mentioned here and here, of setting
    mp3-metadata-interval to 0
    also does not work. So, fiddled with the ices source code and recompiled. Just commented out most of the code in metadata_update function. No more metadata!
  12. Enabled virtual hosts as given here, first making a suitable file sitename.com in
    /etc/apache2/sites-available
    and then
    a2ensite sitename.com
    service apache2 reload
  13. Replaced asp redirects with php redirects for index pages etc.
    header( 'Location: http://www.site.com/new_page.html' ) ;
  14. Our windows web server was ignoring case in filenames - uppercase or lowercase did not matter. With the new Linux server, case does matter, and many many links break. To fix, loading mod_speling. It was already available in /etc/apache2/mods-available. So only had to do
    a2enmod speling
    (a2enmod = apache2 enable module script available on debian/ubuntu)
    Then, had to add CheckSpelling on in /etc/apache2/apache2.conf
    (This part is not well documented!)
  15. Had a large number of Main.asp files (for each old journal issue cover page). Actually these files were almost completely html. So, took the short-cut of serving these files as html. Edited the relevant file in sites-available to add
  16. Then added DirectoryIndex Main.asp
    This caused major breakage, till I added all the other default index pages!
    DirectoryIndex Main.asp index.htm index.html index.php
  17. Apache was giving a 403 forbidden for most pages. Turns out it needs execute permissions also on the directories. This page discusses the same problem and the solution. So, set
    local_umask=022
    file_open_mode=0777
    in vsftpd.conf
The configuration for the radio streams is yet to be finalized, since the icecast configuation has to be tested.

No comments:

Post a Comment