I have a Ubuntu 18.4 LTS server running OpenCPU
, and am able to run the application myapp
by pointing my browser to the address http://myip/ocpu/library/myapp/www/
. I wish to make the app available via the domain name mydomain.name
, and have set up DNS records to point to myip
.
On the server side, I created a file /etc/apache2/sites-available/myapp.conf
, which looks like
<VirtualHost *:80>
ServerName mydomain.name
DocumentRoot /ocpu/lib/myapp/www
LogLevel info
ErrorLog /var/log/myapp/apache_error.log
CustomLog /var/log/myapp/apache_access.log combined
</VirtualHost>
However, sudo systemctl reload apache2
throws an error since it cannot find the documentRoot /ocpu/lib/myapp/www
. In fact, there is no directory ocpu
on the server.
I suspect that I need to set up a .conf
file in /etc/opencpu/server.conf.d
, but the structure of those files look very different from myapp.conf
as given above, and I do not see an entry for a ServerName
.
How do I redirect mydomain.name
to http://myip/ocpu/library/myapp/www/
?