Browse Source

Extended README.md to include nginx config

Michael Honkoop 8 months ago
parent
commit
edc944dd41
1 changed files with 42 additions and 4 deletions
  1. 42 4
      FusionAuth/README.md

+ 42 - 4
FusionAuth/README.md

@@ -7,7 +7,8 @@ A FusionAuth server [https://fusionauth.io/](http://https://fusionauth.io/) reso
 and will assumes that your server has:</summary></br>
 
 * (atleast) 4Gb of memory available.<br>
-* Firewall ports for HTTP/HTTPS should be open(ed).<br>
+* Firewall ports for Default HTTP/HTTPS should be open(ed).<br>
+* (optional) temporary firewall rule to allow port 9011 for initial configuration of FusionAuth.
 * SSH acccess to the box.<br>
 
 Out of scope:
@@ -67,11 +68,11 @@ postgres=# \q
 ```
 VERSION=$(curl -fsSL https://license.fusionauth.io/api/latest-version)
 curl -fsSL https://files.fusionauth.io/products/fusionauth/${VERSION}/fusionauth-app-${VERSION}-1.noarch.rpm > fusionauth-app-${VERSION}-1.noarch.rpm
-dnf install fusionauth-app-1.51.2-1.noarch.rpm
+dnf install -y fusionauth-app-1.51.2-1.noarch.rpm
 
 # OPTIONAL Install for Fusionauth-search
 curl -fsSL https://files.fusionauth.io/products/fusionauth/${VERSION}/fusionauth-search-${VERSION}-1.noarch.rpm > fusionauth-search-${VERSION}-1.noarch.rpm
-dnf install fusionauth-search-1.51.2-1.noarch.rpm
+dnf install -y fusionauth-search-1.51.2-1.noarch.rpm
 ```
 
 ###### Start the fusionauth server.
@@ -83,4 +84,41 @@ systemctl start fusionauth-app
 systemctl start fusionauth-search
 ```
 
-Your fusionauth server should now be running, and available via (http) on port 9011
+Your fusionauth server should now be running, and if you opened the port in your firewall available via (http) on port 9011 for initial configuration (See configuration)
+
+###### Configure nginx as reverse proxy to make FusionAuth avaiable over the default HTTP-port.
+```
+vi /etc/nginx/conf.d/fusionauth.conf
+
+server {
+    listen 80;
+
+    server_name your_server_name;
+    
+    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_set_header        X-Forwarded-Proto $scheme;
+    proxy_read_timeout      90;
+    proxy_http_version      1.1;
+
+    location / {
+      proxy_pass http://localhost:9011;
+    }
+
+}
+```
+
+###### Start and enable nginx reverse proxy server
+```
+systemctl enable nginx --now
+```
+
+Your FusionAuth Server will now be available for configuration via the default HTTP(80) port.
+If you had previously opened up port 9011 on your firewall, you can now close it.
+
+## Initial configuration ##
+
+Use a webbrowser and point it to http://server-address on the corect port ( either :9011, of if you set up the reverse proxy, the port can be omitted)
+
+On the initial screen the only thing you will need to change is the password for the database, which you set up in the postgreSQL section: