Advertisement
Guest User

Untitled

a guest
Apr 29th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.59 KB | None | 0 0
  1. user@ubuntu-server:~$ cat /etc/nginx/nginx.conf
  2.  
  3. user nginx;
  4. worker_processes 1;
  5.  
  6. error_log /var/log/nginx/error.log warn;
  7. pid /var/run/nginx.pid;
  8.  
  9.  
  10. events {
  11. worker_connections 1024;
  12. }
  13.  
  14.  
  15. http {
  16. include /etc/nginx/mime.types;
  17. default_type application/octet-stream;
  18.  
  19. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  20. '$status $body_bytes_sent "$http_referer" '
  21. '"$http_user_agent" "$http_x_forwarded_for"';
  22.  
  23. access_log /var/log/nginx/access.log main;
  24.  
  25. sendfile on;
  26. #tcp_nopush on;
  27.  
  28. keepalive_timeout 65;
  29.  
  30. #gzip on;
  31.  
  32. include /etc/nginx/conf.d/*.conf;
  33. include /usr/local/etc/nginx/servers/*.conf;
  34. }
  35.  
  36. ============================================================================================================
  37.  
  38. user@ubuntu-server:~$ cat /usr/local/etc/nginx/servers/stash.conf
  39. server {
  40. listen 4000;
  41. root /home/user/src/StashServer;
  42.  
  43. location /__send_file_accel {
  44. internal;
  45. alias /;
  46. }
  47.  
  48. location / {
  49. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  50. proxy_set_header HOST $http_host;
  51. proxy_set_header X-Sendfile-Type X-Accel-Redirect;
  52. proxy_set_header X-Accel-Mapping /=/__send_file_accel/;
  53. proxy_redirect off;
  54. proxy_pass http://localhost:3000;
  55. }
  56.  
  57. error_page 500 502 503 504 /500.html;
  58. client_max_body_size 4G;
  59. keepalive_timeout 5;
  60. }
  61.  
  62. ============================================================================================================
  63.  
  64. user@ubuntu-server:~$ cat src/StashServer/config/application.yml
  65. # The location of the stash
  66. stash_directory: '/home/user/.x/videos'
  67.  
  68. # The location metadata should be exported to
  69. stash_metadata_directory: '/home/user/.x/metadata'
  70.  
  71. # The location to store cache files
  72. stash_cache: '/home/user/.x/cache'
  73.  
  74. ============================================================================================================
  75.  
  76. user@ubuntu-server:~$ nginx -V
  77. nginx version: nginx/1.13.0
  78. built by gcc 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.2)
  79. built with OpenSSL 1.0.2g-fips 1 Mar 2016 (running with OpenSSL 1.0.2g 1 Mar 2016)
  80. TLS SNI support enabled
  81. configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie'
  82.  
  83. ============================================================================================================
  84.  
  85. user@ubuntu-server:~/src/StashServer$ puma
  86. Puma starting in single mode...
  87. * Version 3.6.2 (ruby 2.3.1-p112), codename: Sleepy Sunday Serenity
  88. * Min threads: 5, max threads: 5
  89. * Environment: development
  90. * Listening on tcp://0.0.0.0:3000
  91. Use Ctrl-C to stop
  92. ^C- Gracefully stopping, waiting for requests to finish
  93. === puma shutdown: 2017-04-29 10:52:55 +0200 ===
  94. - Goodbye!
  95.  
  96. ============================================================================================================
  97.  
  98. user@ubuntu-server:~/src/StashServer$ sudo nginx -t
  99. nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
  100. nginx: configuration file /etc/nginx/nginx.conf test is successful
  101.  
  102. user@ubuntu-server:~/src/StashServer$ sudo nginx -t -c /usr/local/etc/nginx/servers/stash.conf
  103. nginx: [emerg] "server" directive is not allowed here in /usr/local/etc/nginx/servers/stash.conf:1
  104. nginx: configuration file /usr/local/etc/nginx/servers/stash.conf test failed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement