- Use my own main.beancount file.
   - The demo has a dropdown menu to switch between various files. How can 
   I have the same feature?

>From my understanding fava doesn't look at things in your current 
directory. It either:
  Requires your beancount file to be being passed in the filepath as an 
argument e.g. `$fava main.beancount` or
  you have the file path set via the BEANCOUNT_FILE environment variable.

In both cases, you can have multiple (space delimited) file paths. 
see https://github.com/beancount/fava/blob/master/fava/cli.py#L36



On Tuesday, August 28, 2018 at 5:30:01 AM UTC-7, Ali Kakakhel wrote:
>
> 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 [email protected] <javascript:>
> 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 [email protected] <javascript:>
> 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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/9431d73a-8942-4ddb-9913-acd86ea84b1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to