Hi all,

I am trying to get fava installed on my vps mainly as a teaching tool, but 
I need some help. I am able to reach 
https://fava.example.io/fava/huge-example-file/income-statement/ with my 
local machine's browser. This result suggests to me that fava is using a 
built in example file instead of my own main.beancount file. What I would 
like to be able to do is three-fold:

   - Use my own main.beancount file.
   - Access from https://fava.example.io/
   - The demo has a dropdown menu to switch between various files. How can 
   I have the same feature?

I tried to change --prefix /fava to --prefix /, but nothing changed. I used 
the following pseudo-script on my vps for my setup.

alice@vps ~$ sudo apt-get install python3-pip3
alice@vps ~$ sudo pip3 install beancount
alice@vps ~$ sudo pip3 install fava
alice@vps ~$ sudo nano /etc/systemd/system/fava.service
"""
[Unit]
Description=Fava Web UI for Beancount

[Service]
Type=simple
ExecStart=/usr/local/bin/fava --host localhost --port 5000 --prefix /fava 
/home/alice/beancount/main.beancount
User=alice
"""

alice@vps ~$ sudo nano /etc/apache2/sites-available/fava.example.io.conf
"""
<VirtualHost *:80>
ServerAdmin ad...@example.io
ServerName fava.example.io
ServerAlias www.fava.example.io
#DocumentRoot /var/www/fava.example.io/html
Redirect / https://fava.example.io
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
"""

alice@vps ~$ sudo mkdir -p /var/www/fava.example.io/html
alice@vps ~$ sudo nano 
/etc/apache2/sites-available/fava.example.io-le-ssl.conf
"""
<VirtualHost *:443>
ServerAdmin ad...@example.io
ServerName fava.example.io
ServerAlias www.fava.example.io
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

ProxyPreserveHost On
ProxyRequests off
ProxyPass / http://localhost:5000/
ProxyPassReverse / http://localhost:5000/

# Example SSL configuration
SSLEngine on
SSLProtocol -ALL -SSLv2 -SSLv3 +TLSv1 +TLSv1.1 +TLSv1.2
SSLHonorCipherOrder on
SSLCipherSuite TLSv1.2:RC4:HIGH:!aNULL:!eNULL:!MD5
SSLCompression off
TraceEnable Off
#SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLCertificateFile "/etc/letsencrypt/live/example.io/fullchain.pem"
SSLCertificateKeyFile "/etc/letsencrypt/live/example.io/privkey.pem"
</VirtualHost>
"""

alice@vps ~$ sudo a2enmod proxy proxy_http
alice@vps ~$ sudo a2ensite fava.example.io.conf
alice@vps ~$ sudo a2ensite fava.example.io-le-ssl.conf
alice@vps ~$ sudo systemctl restart apache2
alice@vps ~$ mkdir beancount
alice@vps ~$ cd beancount
alice@vps ~$ wget 
https://raw.githubusercontent.com/beancount/fava/master/contrib/examples/huge-example.beancount
alice@vps ~$ mv huge-example.beancount main.beancount
alice@vps ~$ sudo systemctl start fava


-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/4b17be24-bc4f-4094-bdab-45ee934a1150%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to