Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- user@ubuntu-server:~$ cat /etc/nginx/nginx.conf
- user nginx;
- worker_processes 1;
- error_log /var/log/nginx/error.log warn;
- pid /var/run/nginx.pid;
- events {
- worker_connections 1024;
- }
- http {
- include /etc/nginx/mime.types;
- default_type application/octet-stream;
- log_format main '$remote_addr - $remote_user [$time_local] "$request" '
- '$status $body_bytes_sent "$http_referer" '
- '"$http_user_agent" "$http_x_forwarded_for"';
- access_log /var/log/nginx/access.log main;
- sendfile on;
- #tcp_nopush on;
- keepalive_timeout 65;
- #gzip on;
- include /etc/nginx/conf.d/*.conf;
- include /usr/local/etc/nginx/servers/*.conf;
- }
- ============================================================================================================
- user@ubuntu-server:~$ cat /usr/local/etc/nginx/servers/stash.conf
- server {
- listen 4000;
- root /home/user/src/StashServer;
- location /__send_file_accel {
- internal;
- alias /;
- }
- location / {
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header HOST $http_host;
- proxy_set_header X-Sendfile-Type X-Accel-Redirect;
- proxy_set_header X-Accel-Mapping /=/__send_file_accel/;
- proxy_redirect off;
- proxy_pass http://localhost:3000;
- }
- error_page 500 502 503 504 /500.html;
- client_max_body_size 4G;
- keepalive_timeout 5;
- }
- ============================================================================================================
- user@ubuntu-server:~$ cat src/StashServer/config/application.yml
- # The location of the stash
- stash_directory: '/home/user/.x/videos'
- # The location metadata should be exported to
- stash_metadata_directory: '/home/user/.x/metadata'
- # The location to store cache files
- stash_cache: '/home/user/.x/cache'
- ============================================================================================================
- user@ubuntu-server:~$ nginx -V
- nginx version: nginx/1.13.0
- built by gcc 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.2)
- built with OpenSSL 1.0.2g-fips 1 Mar 2016 (running with OpenSSL 1.0.2g 1 Mar 2016)
- TLS SNI support enabled
- 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'
- ============================================================================================================
- user@ubuntu-server:~/src/StashServer$ puma
- Puma starting in single mode...
- * Version 3.6.2 (ruby 2.3.1-p112), codename: Sleepy Sunday Serenity
- * Min threads: 5, max threads: 5
- * Environment: development
- * Listening on tcp://0.0.0.0:3000
- Use Ctrl-C to stop
- ^C- Gracefully stopping, waiting for requests to finish
- === puma shutdown: 2017-04-29 10:52:55 +0200 ===
- - Goodbye!
- ============================================================================================================
- user@ubuntu-server:~/src/StashServer$ sudo nginx -t
- nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
- nginx: configuration file /etc/nginx/nginx.conf test is successful
- user@ubuntu-server:~/src/StashServer$ sudo nginx -t -c /usr/local/etc/nginx/servers/stash.conf
- nginx: [emerg] "server" directive is not allowed here in /usr/local/etc/nginx/servers/stash.conf:1
- nginx: configuration file /usr/local/etc/nginx/servers/stash.conf test failed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement