|
| 1 | +## |
| 2 | +# You should look at the following URL's in order to grasp a solid understanding |
| 3 | +# of Nginx configuration files in order to fully unleash the power of Nginx. |
| 4 | +# http://wiki.nginx.org/Pitfalls |
| 5 | +# http://wiki.nginx.org/QuickStart |
| 6 | +# http://wiki.nginx.org/Configuration |
| 7 | +# |
| 8 | +# Generally, you will want to move this file somewhere, and start with a clean |
| 9 | +# file but keep this around for reference. Or just disable in sites-enabled. |
| 10 | +# |
| 11 | +# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples. |
| 12 | +## |
| 13 | + |
| 14 | +# Default server configuration |
| 15 | +# |
| 16 | +server { |
| 17 | + listen 80 default_server; |
| 18 | + listen [::]:80 default_server; |
| 19 | + |
| 20 | + return 301 https://onboarding.cloudnowtech.com$request_uri; |
| 21 | + } |
| 22 | +server |
| 23 | + { |
| 24 | + |
| 25 | + # SSL configuration |
| 26 | + # |
| 27 | + # listen 443 ssl default_server; |
| 28 | + # listen [::]:443 ssl default_server; |
| 29 | + # |
| 30 | + # Note: You should disable gzip for SSL traffic. |
| 31 | + # See: https://bugs.debian.org/773332 |
| 32 | + # |
| 33 | + # Read up on ssl_ciphers to ensure a secure configuration. |
| 34 | + # See: https://bugs.debian.org/765782 |
| 35 | + # |
| 36 | + # Self signed certs generated by the ssl-cert package |
| 37 | + # Don't use them in a production server! |
| 38 | + # |
| 39 | + # include snippets/snakeoil.conf; |
| 40 | + |
| 41 | + root /var/www/html; |
| 42 | + |
| 43 | + # Add index.php to the list if you are using PHP |
| 44 | + index index.html index.htm index.nginx-debian.html; |
| 45 | + |
| 46 | + server_name onboarding.cloudnowtech.com; |
| 47 | + |
| 48 | + location / { |
| 49 | + # First attempt to serve request as file, then |
| 50 | + # as directory, then fall back to displaying a 404. |
| 51 | + try_files $uri $uri/ =404; |
| 52 | + } |
| 53 | + |
| 54 | + location ^~ /core/api/v1/hrm { |
| 55 | + proxy_set_header Host $host; |
| 56 | + proxy_set_header X-Real-IP $remote_addr; |
| 57 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 58 | + proxy_set_header X-Forwarded-Proto $scheme; |
| 59 | + proxy_pass http://192.168.100.2:9084; |
| 60 | + proxy_read_timeout 90; |
| 61 | + proxy_redirect http://192.168.100.2:9084 https://onboarding.cloudnowtech.com; |
| 62 | + } |
| 63 | + |
| 64 | + |
| 65 | + location ^~ /core/api/v1/rmt { |
| 66 | + proxy_set_header Host $host; |
| 67 | + proxy_set_header X-Real-IP $remote_addr; |
| 68 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 69 | + proxy_set_header X-Forwarded-Proto $scheme; |
| 70 | + proxy_pass http://192.168.100.2:9085; |
| 71 | + proxy_read_timeout 90; |
| 72 | + proxy_redirect http://192.168.100.2:9085 https://onboarding.cloudnowtech.com; |
| 73 | + } |
| 74 | + |
| 75 | + |
| 76 | + # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 |
| 77 | + # |
| 78 | + #location ~ \.php$ { |
| 79 | + # include snippets/fastcgi-php.conf; |
| 80 | + # |
| 81 | + # # With php7.0-cgi alone: |
| 82 | + # fastcgi_pass 127.0.0.1:9000; |
| 83 | + # # With php7.0-fpm: |
| 84 | + # fastcgi_pass unix:/run/php/php7.0-fpm.sock; |
| 85 | + #} |
| 86 | + |
| 87 | + # deny access to .htaccess files, if Apache's document root |
| 88 | + # concurs with nginx's one |
| 89 | + # |
| 90 | + #location ~ /\.ht { |
| 91 | + # deny all; |
| 92 | + #} |
| 93 | + |
| 94 | + listen [::]:443 ssl ipv6only=on; # managed by Certbot |
| 95 | + listen 443 ssl; # managed by Certbot |
| 96 | + ssl_certificate /etc/letsencrypt/live/onboarding.cloudnowtech.com/fullchain.pem; # managed by Certbot |
| 97 | + ssl_certificate_key /etc/letsencrypt/live/onboarding.cloudnowtech.com/privkey.pem; # managed by Certbot |
| 98 | + include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot |
| 99 | + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot |
| 100 | + |
| 101 | +} |
| 102 | + |
| 103 | + |
| 104 | +# Virtual Host configuration for example.com |
| 105 | +# |
| 106 | +# You can move that to a different file under sites-available/ and symlink that |
| 107 | +# to sites-enabled/ to enable it. |
| 108 | +# |
| 109 | +#server { |
| 110 | +# listen 80; |
| 111 | +# listen [::]:80; |
| 112 | +# |
| 113 | +# server_name example.com; |
| 114 | +# |
| 115 | +# root /var/www/example.com; |
| 116 | +# index index.html; |
| 117 | +# |
| 118 | +# location / { |
| 119 | +# try_files $uri $uri/ =404; |
| 120 | +# } |
| 121 | +#} |
0 commit comments