Thanks for the reply. I will try to use the environment variable method and report back.
In the service file, I set the ExecStart value as follows. ExecStart=/usr/local/bin/fava --host localhost --port 5000 --prefix /fava / home/alice/beancount/main.beancount That last item is the path to the main.beancount file. Does fava act as a user that does not have permission to read the file in that location? On Thursday, August 30, 2018 at 4:43:41 PM UTC-6, Vivek Gani wrote: > > > - 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 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/a45ae69f-0503-4f5f-bc4f-4d43f7e88ec1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.