| # |
| # In order to use apache2 as Service Enabler "SE stub" copy this file to /etc/apache2 |
| # and restart apache with sudo /etc/init.d/apache2 restart in the machine where |
| # you run rootpa in the emulator |
| # |
| # You should also copy folder cgi-bin and its content to /var/www |
| # |
| # (these locations are verified in kubuntu 12.04/ ubuntu 12.10) |
| # |
| |
| # |
| # This file works so that "Location" defines the url that is requested (excluding the ip address), everything inside the Location element |
| # is valid when that URL is requested. Header contains Link and rel to be returned to RootPA handler is the handler function in |
| # perl script in ones the file sin cgi-bin. PerlRequire defines the files used from cgi-bin. This way it is possible to create long conversation |
| # between apache2 server and RootPA. |
| # |
| |
| FallbackResource /index.html |
| |
| PerlRequire /var/www/cgi-bin/first |
| PerlRequire /var/www/cgi-bin/second |
| PerlRequire /var/www/cgi-bin/testi |
| PerlRequire /var/www/cgi-bin/empty |
| PerlRequire /var/www/cgi-bin/delete |
| |
| # intial DELETE uses this |
| <Location /00000000445566778899aabbccddeeff> |
| Header set Link <http://10.0.2.2/activity/00000000-4455-6677-8899-aabbccddeef2>;rel="http://10.0.2.2/relation/command_result" |
| SetHandler perl-script |
| PerlResponseHandler ReceiveDeleteCommand |
| </Location> |
| |
| # intial POST uses this |
| <Location /00000000445566778899aabbccddeeff/8> |
| Header set Link <http://10.0.2.2/activity/00000000-4455-6677-8899-aabbccddeef2>;rel="http://10.0.2.2/relation/command_result" |
| SetHandler perl-script |
| PerlResponseHandler ReceiveFirstCommand |
| </Location> |
| |
| # intial POST/Install uses this |
| <Location /00000000445566778899aabbccddeeff/0> |
| Header set Link <http://10.0.2.2/activity/00000000-4455-6677-8899-aabbccddeef2>;rel="http://10.0.2.2/relation/command_result" |
| SetHandler perl-script |
| PerlResponseHandler ReceiveFirstCommand |
| </Location> |
| |
| <Location /testi> |
| SetHandler perl-scriptq |
| PerlResponseHandler Hello |
| </Location> |
| |
| <Location /activity/00000000-4455-6677-8899-aabbccddeef2> |
| Header set Link <http://10.0.2.2/activity/00000000-4455-6677-8899-aabbccddee11>;rel="http://10.0.2.2/relation/command_result" |
| SetHandler perl-script |
| PerlResponseHandler ReceiveSecondCommand |
| </Location> |
| |
| <Location /activity/00000000-4455-6677-8899-aabbccddee11> |
| Header set Link <http://10.0.2.2/activity/00000000-4455-6677-8899-aabbccddee00>;rel="http://10.0.2.2/relation/system_info" |
| SetHandler perl-script |
| PerlResponseHandler ReceiveCommandReturnEmpty |
| </Location> |
| |
| <Location /activity/00000000-4455-6677-8899-aabbccddee00> |
| Header set Link <http://10.0.2.2/activity/00000000-4455-6677-8899-aabbccddee22>;" |
| SetHandler perl-script |
| PerlResponseHandler ReceiveCommandReturnEmpty |
| </Location> |
| |