sudo -u www-data java -Xms56m -Xmx128m -XX:PermSize=56m -XX:MaxPermSize=128m -jar ./scampiREST-1.0-SNAPSHOT.jar
www-data is a user. It is the same as the nginx user. You should not run the server as root!
The server is creating two folders und /var/tmp and should have write permission there. * /var/tmp/nginxFiles * /var/tmp/scampiRestThe logging is used to be under:
- /var/tmp/scampiRest For security reasons you might want to change the file spring.log which will be created only to write enabled with chmod 222 ./spring.log
Nginx (http://nginx.org/)
upstream backend { server 127.0.0.1:8080 max_fails=3 fail_timeout=30s; }
server { listen 80 default_server; listen [::]:80 default_server;
# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
#
# Read up on ssl_ciphers to ensure a secure configuration.
# See: https://bugs.debian.org/765782
#
# Self signed certs generated by the ssl-cert package
# Don't use them in a production server!
#
# include snippets/snakeoil.conf;
root /var/tmp/nginxFiles/;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
location /dyn {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://backend;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# include snippets/fastcgi-php.conf;
#
# # With php5-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# # With php5-fpm:
# fastcgi_pass unix:/var/run/php5-fpm.sock;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
#server {
}
#}
<h3>Mongodb (https://www.mongodb.org/)</h3>
<h3>Scampi</h3>
<h2>Design Diagrams:</h2>
<h3>Built new Rest Message from Scampi:</h3>
https://creately.com/diagram/ihnap9eq3/rgxMpRw4AMT5vlVSxi9BLBzJU%3D
<h3>Publish new Message to Scampi:</h3>
https://creately.com/diagram/ihn6w04q/HC4OKwFY3QlDbjs2l2NNiN8k9iU%3D
<h3>Request new Service from Scampi:</h3>
https://creately.com/diagram/ihm7ybd31/quPHInTgBHPyNNbzjHlpRcWDtAw%3D
<h2>Curl Commands to test and interact with the API:</h2>
<h3>Request all Messages for a service:</h3>
``` bash
curl -H "Accept: application/json" http://localhost:8080/dyn/service/myservice