Guest User

Untitled

a guest
Dec 13th, 2018
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.53 KB | None | 0 0
  1. # Basic configuration
  2. user nginx;
  3. worker_processes 1;
  4. error_log /dev/stderr info;
  5. pid /var/run/nginx.pid;
  6.  
  7. events {
  8. worker_connections 1024;
  9. }
  10.  
  11. http {
  12. # Standard HTTP configuration with slight hardening
  13. include /etc/nginx/mime.types;
  14. default_type application/octet-stream;
  15. access_log /dev/stdout;
  16. sendfile on;
  17. keepalive_timeout 65;
  18. server_tokens off;
  19.  
  20. #Websockets Server
  21. server {
  22.  
  23. {% if NODE_ENV == "development" %}
  24. listen {{SOCKET_PORT}};
  25. {% else %}
  26. listen 80;
  27. listen [::]:80;
  28. server_name {{ SOCKETS_URL }};
  29.  
  30. # Only enable HTTPS if TLS is enabled with no error
  31. {% if TLS and not TLS_ERROR %}
  32. listen 443 ssl;
  33. {% if TLS and not TLS_ERROR %}
  34. listen 443 ssl;
  35. listen [::]:443 ssl;
  36.  
  37. include /etc/nginx/tls.conf;
  38. add_header Strict-Transport-Security max-age=15768000;
  39.  
  40. if ($scheme = http) {
  41. return 301 https://$host$request_uri;
  42. }
  43. {% endif %}
  44.  
  45. {% endif %}
  46.  
  47. location / {
  48. proxy_pass http://tellform:20523;
  49. proxy_read_timeout 90;
  50.  
  51. proxy_set_header Host $host;
  52. proxy_set_header X-Real-IP $remote_addr;
  53. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  54. proxy_set_header X-Forwarded-Proto $scheme;
  55.  
  56. # WebSocket support
  57. proxy_http_version 1.1;
  58. proxy_set_header Upgrade $http_upgrade;
  59. proxy_set_header Connection "upgrade";
  60.  
  61. {% if TLS and not TLS_ERROR %}
  62. proxy_set_header X-Forwarded-Proto https;
  63. {% endif %}
  64. }
  65. {% endif %}
  66. }
  67.  
  68. {% if TLS_FLAVOR == 'letsencrypt' %}
  69. location ^~ /.well-known/acme-challenge/ {
  70. proxy_pass http://127.0.0.1:8008;
  71. }
  72. {% endif %}
  73. }
  74.  
  75. server {
  76. #Add server_name for per-user subdomains
  77. {% if SUBDOMAINS_DISABLED == "FALSE" %}
  78. server_name {{BASE_URL}} {{SUBDOMAIN_URL}};
  79. {% else %}
  80. server_name {{BASE_URL}};
  81. {% endif %}
  82.  
  83. listen 80;
  84. listen [::]:80;
  85.  
  86. # Only enable HTTPS if TLS is enabled with no error
  87. {% if TLS and not TLS_ERROR %}
  88. listen 443 ssl;
  89. listen [::]:443 ssl;
  90.  
  91. include /etc/nginx/tls.conf;
  92. add_header Strict-Transport-Security max-age=15768000;
  93.  
  94. if ($scheme = http) {
  95. return 301 https://$host$request_uri;
  96. }
  97. return 301 https://$host$request_uri;
  98. }
  99. {% endif %}
  100.  
  101. root /usr/share/nginx/html;
  102. index index.html index.htm;
  103.  
  104. location / {
  105. proxy_pass http://tellform:5000;
  106. proxy_redirect off;
  107. proxy_set_header Host $host;
  108. proxy_set_header X-Real-IP $remote_addr;
  109. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
  110.  
  111. {% if TLS and not TLS_ERROR %}
  112. proxy_set_header X-Forwarded-Proto https;
  113. {% endif %}
  114. }
  115.  
  116. {% if TLS_FLAVOR == 'letsencrypt' %}
  117. location ^~ /.well-known/acme-challenge/ {
  118. proxy_pass http://127.0.0.1:8008;
  119. }
  120. {% endif %}
  121. }
  122. }
  123.  
  124. # Mailu main configuration file
  125. #
  126. # Most configuration variables can be modified through the Web interface,
  127. # these few settings must however be configured before starting the mail
  128. # server and require a restart upon change.
  129.  
  130. ###################################
  131. # Common configuration variables
  132. ###################################
  133.  
  134. # Set this to the path where Mailu data and configuration is stored
  135. # Mac users: Change to a Docker accessible folder
  136. ROOT=/opt/tellform_data
  137.  
  138. # Set to what environment you will be running TellForm in (production or development)
  139. NODE_ENV=production
  140.  
  141. # Set to a randomly generated 16 bytes string
  142. SECRET_KEY=ChangeMeChangeMe
  143.  
  144. # URI of Mongo database that TellForm will connect to
  145. #DO NOT CHANGE
  146. MONGODB_URI=mongodb://mongo/tellform
  147.  
  148. # URL Redis server that TellForm will connect to
  149. #DO NOT CHANGE
  150. REDIS_URL=redis://redis:6379
  151.  
  152. # Port that the TellForm Node app will listen on
  153. PORT=5000
  154.  
  155. # Domain that TellForm's admin panel will be hosted at
  156. BASE_URL=159.65.251.176
  157.  
  158. # Port that SocketIO server (for analytics) will listen on
  159. SOCKET_PORT=20523
  160.  
  161. #Choose what kind of TLS you want
  162. TLS_FLAVOR=cert
  163.  
  164. ###################################
  165. # Optional features
  166. ###################################
  167.  
  168. # Set this to enable coveralls.io support
  169. COVERALLS_REPO_TOKEN=NC5TbhEeeJXqos552EHyRORvuVtTChTWq
  170.  
  171. # Disable signups for your TellForm instance
  172. SIGNUP_DISABLED=FALSE
  173.  
  174. # Disable per-user custom subdomains
  175. SUBDOMAINS_DISABLED=FALSE
  176.  
  177. # Url that subdomains will be hosted at (has to have domain name as ADMIN_URL)
  178. # Only used when SUBDOMAINS_DISABLED=FALSE
  179. SUBDOMAIN_URL=*.tellform.dev
  180.  
  181. # Enable running TellForm in pm2's 'cluster' mode
  182. ENABLE_CLUSTER_MODE=FALSE
  183. ###################################
  184. # Mail settings
  185. ###################################
  186.  
  187. # Set this to set the username credential of your SMTP service
  188. MAILER_EMAIL_ID=
  189.  
  190. # Set this to set the password credential of your SMTP service
  191. MAILER_PASSWORD=
  192.  
  193. # Set this to set the email address that all email should be sent from for signup/verification emails
  194. MAILER_FROM=
  195.  
  196. # Set this to any services from https://nodemailer.com/smtp/well-known/ to use a 'well-known' email provider
  197. MAILER_SERVICE_PROVIDER=
  198.  
  199. # Set these if you are not using a 'MAILER_SERVICE_PROVIDER' and want to specify your SMTP server's address and port
  200. MAILER_SMTP_HOST=
  201. MAILER_SMTP_PORT=
  202.  
  203. # Set this if you are using a custom SMTP server that supports SSL
  204. MAILER_SMTP_SECURE
  205.  
  206. ###################################
  207. # Automatic Admin Creation Settings
  208. ###################################
  209.  
  210. # Set this to "TRUE" if you wish to automatically create an admin user on startup
  211. CREATE_ADMIN=FALSE
  212.  
  213. # Set this to set the email used by your default admin account
  214. ADMIN_EMAIL=admin@admin.com
  215. # Set this to set the username of your default admin acconut
  216. ADMIN_USERNAME=root
  217.  
  218. # Set this to set the password of your default admin account
  219. ADMIN_PASSWORD=root
  220.  
  221. ###################################
  222. # Advanced settings
  223. ###################################
  224.  
  225. # Set this to server your websockets server on a seperate URL
  226. SOCKETS_URL=127.0.0.1
  227.  
  228. # Set this to change the port that TellForm will listen on
  229. PORT=5000
  230.  
  231. # Set this to your Google Analytics ID to enable tracking with GA
  232. GOOGLE_ANALYTICS_ID=
  233.  
  234. # Set this to your Sentry.io DSN code to enable front-end JS error tracking with Sentry.io
  235. RAVEN_DSN
  236.  
  237. # Set this to set the 'name' meta property in the HTML <head>
  238. APP_NAME=
  239.  
  240. # Set this to set the 'keywords' meta property in the HTML <head>
  241. APP_KEYWORDS=
  242.  
  243. # Set this to set the 'description' meta property in the HTML head
  244. APP_DESC=
Add Comment
Please, Sign In to add comment