Skip to content

Commit d9efaf3

Browse files
committed
Formatting
1 parent 99172df commit d9efaf3

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

README.MD

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,26 @@ Instructions for deploying a spring boot application on Ubuntu 16.04 using nginx
55
## Install Nginx
66
`apt-get update`
77
`apt upgrade`
8-
`apt-get install nginx`
8+
`apt-get install nginx`
99
`apt-get install systemd`
1010

11-
Check Nginx version to see if installation was successfull: `nginx -v`
11+
Check Nginx version to see if installation was successfull: `nginx -v`
1212

1313
## Install Java
1414
`apt-get update`
1515
`apt-get install default-jre`
1616
`apt-get install default-jdk`
17-
Check Java version to see if installation was successfull: `java -version`
17+
Check Java version to see if installation was successfull: `java -version`
1818

1919
## Add a new user where the application will be running
2020
`adduser <username>`
2121
`usermod -a -G sudo <username>`
2222

23-
In the new user directory create a new directory called root. This is where the application jar will be added.
23+
In the new user directory create a new directory called root. This is where the application jar will be added.
2424

2525
## Create an service to start the application
2626

27-
In `/etc/systemd/system/` create a `<myservice>.service` file and add the following.
27+
In `/etc/systemd/system/` create a `<myservice>.service` file and add the following.
2828

2929
```
3030
[Unit]
@@ -47,14 +47,14 @@ WantedBy=multi-user.target
4747
```
4848

4949
## Create an Nginx Config file
50-
In `/etc/nginx/sites-available/` create `<my-appname>` file and add the below setup:
50+
In `/etc/nginx/sites-available/` create `<my-appname>` file and add the below setup:
5151

5252
```
5353
server {
5454
listen 80;
5555
listen [::]:80;
5656
server_name <servername>;
57-
57+
5858
location / {
5959
proxy_pass http://localhost:8080/;
6060
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -68,7 +68,7 @@ The default port for Spring boot applications are on port 8080 if you changed th
6868

6969
After creating the file run the following command `ln -s /etc/nginx/sites-available/<my-appname> /etc/nginx/sites-enabled` to symlink the file to the sites enabled directory.
7070

71-
Now run `systemctl restart nginx` to restart nginx for the above to take affect.
71+
Now run `systemctl restart nginx` to restart nginx for the above to take affect.
7272

7373
## Deploy
7474
Build the spring boot jar file and upload it to: `/home/<username>/root/`
@@ -79,7 +79,7 @@ We can check the status of the application/service by running: `systemctl status
7979

8080
If we want to stop the application at anytime we just run the command: `systemctl stop <myservice>`
8181

82-
Now just go to any of the paths setup in spring boot and it should be up and running.
82+
Now just go to any of the paths setup in spring boot and it should be up and running.
8383

8484
## SSL/HTTPS
8585

@@ -92,10 +92,10 @@ To run the application over HTTPS we will be installing certbot from letsencrypt
9292
`apt-get install python-certbot-nginx`
9393
`certbot --nginx`
9494

95-
Follow the instructions and complete the certificate installation.
95+
Follow the instructions and complete the certificate installation.
9696

97-
### FYI
97+
### FYI
9898

9999
All above commands are issued from root, to issue from the user just add `sudo` to the beginning of the command.
100100

101-
In all the above wherevere something is in `<>` it means add your own value for this param.
101+
In all the above wherevere something is in `<>` it means add your own value for this param.

0 commit comments

Comments
 (0)