Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

$ mysql -u root -p

mysql>create database ofbiz;
mysql>create database ofbizolap;
mysql>create database ofbiztenant;
mysql>use mysql;
mysql>select database();
mysql>create user ofbiz@localhost;
mysql>create user ofbizolap@localhost;
mysql>create user ofbiztenant@localhost;
mysql>set password for 'ofbiz'@'localhost' = PASSWORD("ofbiz");
mysql>set password for 'ofbizolap'@'localhost' = PASSWORD("ofbizolap");
mysql>set password for 'ofbiztenant'@'localhost' = PASSWORD("ofbiztenant");
mysql>grant all privileges on *.* to 'ofbiz'@localhost identified by 'ofbiz';
mysql>grant all privileges on *.* to 'ofbizolap'@localhost identified by 'ofbizolap';
mysql>grant all privileges on *.* to 'ofbiztenant'@localhost identified by 'ofbiztenant';
</pre>

Seed the database

Then run gradle to seed the database. It is recommended to use the demo data, as there are lots of dependencies in various tables on having at least one record in some other seemingly unrelated table.

...

/etc/apache2/sites-available/example.conf

<VirtualHost *:80>
ServerName example.ca
DocumentRoot /var/www/ofbiz/
ProxyRequests Off
<Proxy *>
AddDefaultCharset off
Order deny,allow
Allow from all
</Proxy>
ProxyVia On
ProxyPreserveHost On
ProxyPass /.well-known !
ProxyPass "/" "ajp://localhost:8009/"
</VirtualHost>

...


<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName example.ca
DocumentRoot /var/www/ofbiz/
ProxyRequests Off
<Proxy *>
AddDefaultCharset off
Order deny,allow
Allow from all
</Proxy>
ProxyVia On
ProxyPreserveHost On
ProxyPass /.well-known !
ProxyPass "/" "ajp://localhost:8009/"

ServerAlias example.ca
SSLCertificateFile /etc/letsencrypt/live/example.ca/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.ca/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>


Then

...

enable

...

the

...

secure

...

site

...

with:

$ sudo a2ensite example-le-ssl
$ sudo service apache2 reload



Lastly, we can enable redirects from our http port 80 site to the SSL side:

...

Page properties
hiddentrue

Related issues