It is a bundler template of Honyomi web application for apache passenger.
Honyomi is a ebook (pdf) search engine written by Ruby. It have command line interface and web application. It will accelerate the ebook of your life.
Please protect by authentication if you put the files that is copyrighted to the Internet.
This code is using basic authentication.
It's a quick start guide to install honyomi under the /var/www/html/
.
And directory design is below.
Path | Contens |
---|---|
data/ | HONYOMI_DATABASE_DIR |
vendor/ | Gem install dir |
book/ | Book files (.pdf, etc) |
public/ | DocumentRoot |
$ cd /var/www/html
$ git clone https://github.com/ongaeshi/honyomi-web.git honyomi
$ cd /var/www/html/honyomi
$ bundle install --path vendor/bundle
When you faild to install Honyomi, Please refer.
$ cd /var/www/html/honyomi
$ HONYOMI_DATABASE_DIR=/var/www/html/honyomi/data bundle exec honyomi init
- Copy pdf to book/ folder
- honyomi add
$ cd /var/www/html/honyomi
$ HONYOMI_DATABASE_DIR=/var/www/html/honyomi/data bundle exec honyomi add book/aaa.pdf
A 1 aaa (16 pages)
Put your configuration to virtualhosts.conf
like this.
$ cat /etc/httpd/conf.d/virtualhost.conf
<VirtualHost *:80>
ServerName honyomi.example.com
DocumentRoot /var/www/html/honyomi/public
PassengerHighPerformance on
SetEnv HONYOMI_DATABASE_DIR /var/www/html/honyomi/data
</VirtualHost>
# for Basic Authentication
<Directory /var/www/html/honyomi>
AllowOverride All
</Directory>
Edit /var/www/html/honyomi/.htaccess
AuthType Basic
AuthName "Honyomi"
-AuthUserFile /path/to/.htpasswd
+AuthUserFile /var/www/html/honyomi.htpasswd
require valid-user
Create .htpasswd
$ cd /var/www/html/honyomi
$ htpasswd -c .htpasswd username
Adding password for username.
New password: xxxx
Re-type new password: xxxx
Restart apache.
$ sudo /etc/init.d/httpd restart
Open url like http://honyomi.example.com/
which you specified.
It works fine if you saw milk bottle icon.
Thant's all. finished.