Configure AllegroGraph in a Virtual Server using Apache2

Senerio
I need to deploy AllegroGraph 5.0 triplestore on our lab‘s virtual server and make it publicly accessible at http://xxx.xx.xxx.edu/agwebview/, I did the following to make it work. 

You need to have a virtual server allocated and Apache2 enabled readily for use, the domain is http://xxx.xx.xxx.edu. This virtual server is hosting a particular project whose backend database is supported by AllegroGraph. I would like to have access this database UI at http://xxx.xx.xxx.edu/agwebview/ .

I also like AllegroGraph because it‘s super easy, user-friendly and generous to use. (I am fed up with configuring triplestores like Virtuoso and Bigdata Nanosparqlserver, why they are made so damn hard to use?). Franz Inc. (A company who releases AllegroGraph) allows users to use AG up to 5 million triples under a free licence (which is pretty much enough for my project), I will give you a comparision to understand this 5 million tiples: once I uploaded a 12Gb RDF/XML file into it and it‘s around 5.5 Million triples, so you could see that this free licence is pretty generous so that you could load somewhat 10Gb RDF data into it. 

Another reason I love AllegroGraph is that their documentation is super super well writen!!! Literally, SUPER SUPER WELL WRITEN! It‘s very clear, very detailled as well. You could just follow it up, very very straightforward.  

1. Install AllegroGraph on ubuntu:
There are also ways to install it on Mac or windows, but the following link is specific to ubuntu

Please follow this official link: http://franz.com/agraph/support/documentation/current/server-installation.html

2. Start your AllegroGraph
start and stop AllegroGraph commands will show up in the terminal at the end of installation. Please keep them for future use.
Now, start your AllegroGraph using the start command. So you can see that AG is running at http://localhost:10035 

3. Configure your Apache2 
enable the following Apahce2 Modules: 
     mod_rewrite
     mod_proxy
     mod_proxy_http
     mod_proxy_html
by using the following command:

sudo a2enmod rewrite proxy proxy_http proxy_html

ERROR Debugging:
if you see an error: ERROR: Module proxy_html does not exist!
you need to do the following in the terminal

sudo apt-get install libapache2-mod-proxy-html

Then enable is module by 

sudo a2enmod proxy_html

You can restart your apache2 now for modules to take effects. 

sudo /etc/init.d/apache2 restart
# or
sudo service apache2 restart

# either way works

 

4. Configure apache2

Go to /etc/apache2/sites-enabled/ directory and open 000-default file
add the following contents right between </Directory> and </VirtualHost>

# the following added by Rui Yan 
    RewriteEngine On
    RewriteRule ^/agwebview$ /agwebview/ [R,L]

    ProxyTimeout 1800
    ProxyRequests Off
 
    ProxyPass /agwebview http://localhost:10035
    ProxyPassReverse /agwebview http://localhost:10035
    
    <Location /agwebview>
        Order allow,deny
        allow from all
    </Location>
   # end of addition 

5. Restart your server again
6. Go to http://xxx.xx.xxx.edu/agwebview/ and it‘s there!!!!!!!

 

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。