Advertisement
Guest User

Untitled

a guest
Jul 17th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.93 KB | None | 0 0
  1. nginx version: nginx/1.10.0 (Ubuntu)
  2. built with OpenSSL 1.0.2g 1 Mar 2016
  3. TLS SNI support enabled
  4. configure arguments: --with-cc-opt='-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_addition_module --with-http_dav_module --with-http_flv_module --with-http_geoip_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_mp4_module --with-http_perl_module --with-http_random_index_module --with-http_secure_link_module --with-http_v2_module --with-http_sub_module --with-http_xslt_module --with-mail --with-mail_ssl_module --with-stream --with-stream_ssl_module --with-threads --add-module=/build/nginx-pzhfc2/nginx-1.10.0/debian/modules/headers-more-nginx-module --add-module=/build/nginx-pzhfc2/nginx-1.10.0/debian/modules/nginx-auth-pam --add-module=/build/nginx-pzhfc2/nginx-1.10.0/debian/modules/nginx-cache-purge --add-module=/build/nginx-pzhfc2/nginx-1.10.0/debian/modules/nginx-dav-ext-module --add-module=/build/nginx-pzhfc2/nginx-1.10.0/debian/modules/nginx-development-kit --add-module=/build/nginx-pzhfc2/nginx-1.10.0/debian/modules/nginx-echo --add-module=/build/nginx-pzhfc2/nginx-1.10.0/debian/modules/ngx-fancyindex --add-module=/build/nginx-pzhfc2/nginx-1.10.0/debian/modules/nginx-http-push --add-module=/build/nginx-pzhfc2/nginx-1.10.0/debian/modules/nginx-lua --add-module=/build/nginx-pzhfc2/nginx-1.10.0/debian/modules/nginx-upload-progress --add-module=/build/nginx-pzhfc2/nginx-1.10.0/debian/modules/nginx-upstream-fair --add-module=/build/nginx-pzhfc2/nginx-1.10.0/debian/modules/ngx_http_substitutions_filter_module
  5.  
  6. # configuration file /etc/nginx/nginx.conf:
  7. user www-data;
  8. worker_processes auto;
  9. pid /run/nginx.pid;
  10.  
  11. events {
  12. worker_connections 768;
  13. # multi_accept on;
  14. }
  15.  
  16. http {
  17.  
  18. ##
  19. # Basic Settings
  20. ##
  21.  
  22. sendfile on;
  23. tcp_nopush on;
  24. tcp_nodelay on;
  25. keepalive_timeout 65;
  26. types_hash_max_size 2048;
  27. # server_tokens off;
  28.  
  29. # server_names_hash_bucket_size 64;
  30. # server_name_in_redirect off;
  31.  
  32. include /etc/nginx/mime.types;
  33. default_type application/octet-stream;
  34.  
  35. ##
  36. # SSL Settings
  37. ##
  38.  
  39. ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
  40. ssl_prefer_server_ciphers on;
  41.  
  42. ##
  43. # Logging Settings
  44. ##
  45.  
  46. access_log /var/log/nginx/access.log;
  47. error_log /var/log/nginx/error.log;
  48.  
  49. ##
  50. # Gzip Settings
  51. ##
  52.  
  53. gzip on;
  54. gzip_disable "msie6";
  55.  
  56. # gzip_vary on;
  57. # gzip_proxied any;
  58. # gzip_comp_level 6;
  59. # gzip_buffers 16 8k;
  60. # gzip_http_version 1.1;
  61. # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
  62.  
  63. ##
  64. # Virtual Host Configs
  65. ##
  66.  
  67. index index.html index.htm index.php;
  68. include /etc/nginx/conf.d/*.conf;
  69. include /etc/nginx/sites-enabled/*;
  70. }
  71.  
  72. types {
  73. text/html html htm shtml;
  74. text/css css;
  75. text/xml xml;
  76. image/gif gif;
  77. image/jpeg jpeg jpg;
  78. application/javascript js;
  79. application/atom+xml atom;
  80. application/rss+xml rss;
  81.  
  82. text/mathml mml;
  83. text/plain txt;
  84. text/vnd.sun.j2me.app-descriptor jad;
  85. text/vnd.wap.wml wml;
  86. text/x-component htc;
  87.  
  88. image/png png;
  89. image/tiff tif tiff;
  90. image/vnd.wap.wbmp wbmp;
  91. image/x-icon ico;
  92. image/x-jng jng;
  93. image/x-ms-bmp bmp;
  94. image/svg+xml svg svgz;
  95. image/webp webp;
  96.  
  97. application/font-woff woff;
  98. application/java-archive jar war ear;
  99. application/json json;
  100. application/mac-binhex40 hqx;
  101. application/msword doc;
  102. application/pdf pdf;
  103. application/postscript ps eps ai;
  104. application/rtf rtf;
  105. application/vnd.apple.mpegurl m3u8;
  106. application/vnd.ms-excel xls;
  107. application/vnd.ms-fontobject eot;
  108. application/vnd.ms-powerpoint ppt;
  109. application/vnd.wap.wmlc wmlc;
  110. application/vnd.google-earth.kml+xml kml;
  111. application/vnd.google-earth.kmz kmz;
  112. application/x-7z-compressed 7z;
  113. application/x-cocoa cco;
  114. application/x-java-archive-diff jardiff;
  115. application/x-java-jnlp-file jnlp;
  116. application/x-makeself run;
  117. application/x-perl pl pm;
  118. application/x-pilot prc pdb;
  119. application/x-rar-compressed rar;
  120. application/x-redhat-package-manager rpm;
  121. application/x-sea sea;
  122. application/x-shockwave-flash swf;
  123. application/x-stuffit sit;
  124. application/x-tcl tcl tk;
  125. application/x-x509-ca-cert der pem crt;
  126. application/x-xpinstall xpi;
  127. application/xhtml+xml xhtml;
  128. application/xspf+xml xspf;
  129. application/zip zip;
  130.  
  131. application/octet-stream bin exe dll;
  132. application/octet-stream deb;
  133. application/octet-stream dmg;
  134. application/octet-stream iso img;
  135. application/octet-stream msi msp msm;
  136.  
  137. application/vnd.openxmlformats-officedocument.wordprocessingml.document docx;
  138. application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx;
  139. application/vnd.openxmlformats-officedocument.presentationml.presentation pptx;
  140.  
  141. audio/midi mid midi kar;
  142. audio/mpeg mp3;
  143. audio/ogg ogg;
  144. audio/x-m4a m4a;
  145. audio/x-realaudio ra;
  146.  
  147. video/3gpp 3gpp 3gp;
  148. video/mp2t ts;
  149. video/mp4 mp4;
  150. video/mpeg mpeg mpg;
  151. video/quicktime mov;
  152. video/webm webm;
  153. video/x-flv flv;
  154. video/x-m4v m4v;
  155. video/x-mng mng;
  156. video/x-ms-asf asx asf;
  157. video/x-ms-wmv wmv;
  158. video/x-msvideo avi;
  159. }
  160.  
  161. # configuration file /etc/nginx/sites-enabled/its4netsolutions.com:
  162. server {
  163. server_name www.mydomain.com;
  164. return 301 $scheme://mydomain.com$request_uri;
  165. }
  166.  
  167. server {
  168. listen 443 ssl http2;
  169. listen [::]:443 ssl http2;
  170.  
  171. server_name webdav.mydomain.com;
  172.  
  173. include snippets/mydomain_com.conf;
  174. include snippets/ssl-params.conf;
  175.  
  176. location /xyz {
  177. root /var/dav/xyz;
  178. client_body_temp_path /var/dav/temp;
  179. dav_methods PUT DELETE MKCOL COPY MOVE;
  180. dav_ext_methods PROPFIND OPTIONS;
  181. create_full_put_path on;
  182. dav_access user:rw group:r all:r;
  183. autoindex on;
  184. auth_basic "BSU WebDAV";
  185. auth_basic_user_file /etc/nginx/.xyzdav;
  186. }
  187. }
  188.  
  189. # configuration file /etc/nginx/snippets/mydomain_com.conf:
  190. ssl_certificate /etc/letsencrypt/live/mydomain.com/fullchain.pem;
  191. ssl_certificate_key /etc/letsencrypt/live/mydomain.com/privkey.pem;
  192.  
  193. # configuration file /etc/nginx/snippets/ssl-params.conf:
  194. # from https://cipherli.st/
  195. # and https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html
  196.  
  197. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  198. ssl_prefer_server_ciphers on;
  199. ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
  200. ssl_ecdh_curve secp384r1;
  201. ssl_session_cache shared:SSL:10m;
  202. ssl_session_tickets off;
  203. ssl_stapling on;
  204. ssl_stapling_verify on;
  205. resolver 8.8.8.8 8.8.4.4 valid=300s;
  206. resolver_timeout 5s;
  207. # Disable preloading HSTS for now. You can use the commented out header line that includes
  208. # the "preload" directive if you understand the implications.
  209. #add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
  210. add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";
  211. add_header X-Frame-Options DENY;
  212. add_header X-Content-Type-Options nosniff;
  213.  
  214. ssl_dhparam /etc/ssl/certs/dhparam.pem;
  215.  
  216. user@ubuntu:~$ cadaver https://webdav.mydomain.com/xyz
  217. Authentication required for WebDAV on server `webdav.mydomain.com':
  218. Username: user
  219. Password:
  220. Could not access /xyz/ (not WebDAV-enabled?):
  221. 207 Multi-Status
  222. Connection to `webdav.mydomain.com' closed.
  223. dav:!>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement