## # You should look at the following URL's in order to grasp a solid understanding # of Nginx configuration files in order to fully unleash the power of Nginx. # https://www.nginx.com/resources/wiki/start/ # https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/ # https://wiki.debian.org/Nginx/DirectoryStructure # # In most cases, administrators will remove this file from sites-enabled/ and # leave it as reference inside of sites-available where it will continue to be # updated by the nginx packaging team. # # This file will automatically load configuration files provided by other # applications, such as Drupal or Wordpress. These applications will be made # available underneath a path with that package name, such as /drupal8. # # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples. ## # Default server configuration (http://) server { listen 80 default_server; listen [::]:80 default_server; server_name _; location / { proxy_pass http://localhost:8080/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } } ## Configuration with SSL (https://). ## Replace YOUR_DOMAIN_NAME with your domain name (e.g., example.com). ## Replace PATH_TO_YOUR_CERTIFICATE and PATH_TO_YOUR_SECRET_KEY with the ## full path to your SSL certificate and key. For instance, if you saved ## them in /root/.ssl/ you would have: /root/.ssl/certificate.crt. ## Don't forget the semicolon to terminate each line! # server { # listen 80; # server_name YOUR_DOMAIN_NAME; # # If you do not have a domain name, but just an IP, comment the previous # # line and uncomment the following one. # # server_name _; # rewrite ^/(.*) https://YOUR_DOMAIN_NAME/$1 permanent; # } # # server { # # listen 443 ssl; # server_name YOUR_DOMAIN_NAME; # # If you do not have a domain name, but just an IP, comment the # # previous line and uncomment the following one. # # server_name _; # ssl_certificate PATH_TO_YOUR_CERTIFICATE; # ssl_certificate_key PATH_TO_YOUR_SECRET_KEY; # # # location / { # proxy_pass http://localhost:8080/; # proxy_http_version 1.1; # proxy_set_header Upgrade $http_upgrade; # proxy_set_header Connection 'upgrade'; # proxy_set_header Host $host; # proxy_cache_bypass $http_upgrade; # } # # }