Advertisement
Guest User

Untitled

a guest
Aug 28th, 2015
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.14 KB | None | 0 0
  1. <VirtualHost _default_:80>
  2. ServerName hg.mydomain.com
  3. ServerAdmin admin@mydomain.com
  4. ServerAlias rhodecode.mydomain.com
  5.  
  6. DocumentRoot "/srv/www/htdocs"
  7. RewriteEngine On
  8. RewriteCond %{HTTPS} off
  9. RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
  10. HostnameLookups Off
  11. UseCanonicalName Off
  12. ServerSignature Off
  13. ....
  14. </VirtualHost>
  15.  
  16. Redirect permanent / https://hg.mydomain.com/
  17.  
  18. https://rhodecode.mydomain.com/_admin/login?came_from=%2F
  19.  
  20. <VirtualHost _default_:443>
  21.  
  22. ServerName hg.mydomain.com
  23. ServerAdmin admin@mydomain.com
  24. ServerAlias rhodecode.mydomain.com
  25.  
  26. DocumentRoot "/srv/www/htdocs"
  27. HostnameLookups Off
  28. UseCanonicalName Off
  29. ServerSignature Off
  30.  
  31. SSLEngine on
  32.  
  33. certificate stuff ...
  34.  
  35. WSGIDaemonProcess hg.mydomain.com user=rhodecode group=users threads=5
  36. home=/home/rhodecode/rhodecode-env python-path=/home/rhodecode/rhodecode-env/lib/python2.7/site-packages
  37. WSGIScriptAlias / /home/rhodecode/rhodecode-env/dispatch.wsgi
  38. WSGIPassAuthorization On
  39.  
  40. <Directory /home/rhodecode/rhodecode-env>
  41. WSGIProcessGroup hg.mydomain.com
  42. WSGIApplicationGroup %{GLOBAL}
  43. Order deny,allow
  44. Allow from all
  45. </Directory>
  46.  
  47. </VirtualHost>
  48.  
  49. 172.17.1.49 - - [04/Mar/2014:00:06:24 +0000] [rhodecode.mydomain.com/sid#7f6a03266f00][rid#7f69fd68d7a0/initial/redir#1] (2) init rewrite engine with requested uri /error/HTTP_NOT_FOUND.html.var
  50. 172.17.1.49 - - [04/Mar/2014:00:06:24 +0000] [rhodecode.mydomain.com/sid#7f6a03266f00][rid#7f69fd68d7a0/initial/redir#1] (3) applying pattern '(.*)' to uri '/error/HTTP_NOT_FOUND.html.var'
  51. 172.17.1.49 - - [04/Mar/2014:00:06:24 +0000] [rhodecode.mydomain.com/sid#7f6a03266f00][rid#7f69fd68d7a0/initial/redir#1] (4) RewriteCond: input='off' pattern='off' => matched
  52. 172.17.1.49 - - [04/Mar/2014:00:06:24 +0000] [rhodecode.mydomain.com/sid#7f6a03266f00][rid#7f69fd68d7a0/initial/redir#1] (2) rewrite '/error/HTTP_NOT_FOUND.html.var' -> 'https://rhodecode.mydomain.com/error/HTTP_NOT_FOUND.html.var'
  53. 172.17.1.49 - - [04/Mar/2014:00:06:24 +0000] [rhodecode.mydomain.com/sid#7f6a03266f00][rid#7f69fd68d7a0/initial/redir#1] (2) explicitly forcing redirect with https://rhodecode.mydomain.com/error/HTTP_NOT_FOUND.html.var
  54. 172.17.1.49 - - [04/Mar/2014:00:06:24 +0000] [rhodecode.mydomain.com/sid#7f6a03266f00][rid#7f69fd68d7a0/initial/redir#1] (1) escaping https://rhodecode.mydomain.com/error/HTTP_NOT_FOUND.html.var for redirect
  55. 172.17.1.49 - - [04/Mar/2014:00:06:24 +0000] [rhodecode.mydomain.com/sid#7f6a03266f00][rid#7f69fd68d7a0/initial/redir#1] (1) redirect to https://rhodecode.mydomain.com/error/HTTP_NOT_FOUND.html.var [REDIRECT/301]
  56.  
  57. hg.mydomain.com:443 172.17.1.49 - - [04/Mar/2014:02:09:13 +0000] "POST /_admin/login?came_from=%252F HTTP/1.1" 302 186 "https://rhodecode.mydomain.com/_admin/login?came_from=%252F" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36"
  58. hg.mydomain.com:80 172.17.1.49 - - [04/Mar/2014:02:09:14 +0000] "GET /_admin/%2F HTTP/1.1" 301 268 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36"
  59. hg.mydomain.com:443 172.17.1.49 - - [04/Mar/2014:02:09:14 +0000] "GET /error/HTTP_NOT_FOUND.html.var HTTP/1.1" 200 1132 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36"
  60. hg.mydomain.com:443 172.17.1.49 - - [04/Mar/2014:02:09:14 +0000] "GET /favicon.ico HTTP/1.1" 404 618 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36"
  61.  
  62. POST /_admin/login?came_from=%252F HTTP/1.1
  63. Host: rhodecode.mydomain.com
  64. Cache-Control: no-cache
  65. Pragma: no-cache
  66. Origin: https://rhodecode.mydomain.com
  67. Content-Type: application/x-www-form-urlencoded
  68. Referer: https://rhodecode.mydomain.com/_admin/login?came_from=%252F
  69. Cookie: rhodecode=3af58050ce87a93caa5a4c6809c5dacef4afb29d8e74b152c97f469199c554b6f67f7aa7
  70. ...
  71.  
  72. HTTP/1.1 302 Found
  73. Date: Tue, 04 Mar 2014 02:24:11 GMT
  74. Server: Apache/2.2.22 (Linux/SUSE)
  75. Pragma: no-cache
  76. Cache-Control: no-cache
  77. Set-Cookie: rhodecode=f0a94a155738490da032b46354f4d72338902da2d69bc1177bcf4086aa8158f4719526e0; httponly; Path=/
  78. Location: http://rhodecode.mydomain.com/_admin/%2F
  79. ...
  80.  
  81. GET /_admin/%2F HTTP/1.1
  82. Host: rhodecode.mydomain.com
  83. Cache-Control: no-cache
  84. Pragma: no-cache
  85. Cookie: rhodecode=f0a94a155738490da032b46354f4d72338902da2d69bc1177bcf4086aa8158f4719526e0
  86. ...
  87.  
  88. HTTP/1.1 301 Moved Permanently
  89. Date: Tue, 04 Mar 2014 02:24:12 GMT
  90. Server: Apache/2.2.22 (Linux/SUSE)
  91. Location: https://rhodecode.mydomain.com/error/HTTP_NOT_FOUND.html.var
  92. ...
  93.  
  94. [Rober@yue ~]$ nc rhodecode.mydomain.com 80
  95. GET /%2F HTTP/1.1
  96. Host: rhodecode.mydomain.com
  97.  
  98. HTTP/1.1 301 Moved Permanently
  99. Date: Tue, 04 Mar 2014 00:07:26 GMT
  100. Server: Apache/2.2.22 (Linux/SUSE)
  101. Location: https://rhodecode.mydomain.com/error/HTTP_NOT_FOUND.html.var
  102. Content-Length: 268
  103. Content-Type: text/html; charset=iso-8859-1
  104.  
  105. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
  106. <html><head>
  107. <title>301 Moved Permanently</title>
  108. </head><body>
  109. <h1>Moved Permanently</h1>
  110. <p>The document has moved <a href="https://rhodecode.mydomain.com/error/HTTP_NOT_FOUND.html.var">here</a>.</p>
  111. </body></html>
  112.  
  113. GET /%2F HTTP/1.1
  114. Host: rhodecode.mydomain.com
  115.  
  116. HTTP/1.1 301 Moved Permanently
  117. Date: Thu, 06 Mar 2014 04:23:31 GMT
  118. Server: Apache/2.2.22 (Linux/SUSE)
  119. Location: https://rhodecode.mydomain.com/error/HTTP_NOT_FOUND.html.var
  120. Content-Length: 268
  121. Content-Type: text/html; charset=iso-8859-1
  122.  
  123. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
  124. <html><head>
  125. <title>301 Moved Permanently</title>
  126. </head><body>
  127. <h1>Moved Permanently</h1>
  128. <p>The document has moved <a href="https://rhodecode.mydomain.com/error/HTTP_NOT_FOUND.html.var">here</a>.</p>
  129. </body></html>
  130.  
  131. GET /abffr HTTP/1.1
  132. Host: rhodecode.mydomain.com
  133.  
  134. HTTP/1.1 301 Moved Permanently
  135. Date: Thu, 06 Mar 2014 04:25:19 GMT
  136. Server: Apache/2.2.22 (Linux/SUSE)
  137. Location: https://rhodecode.mydomain.com/abffr
  138. Content-Length: 244
  139. Content-Type: text/html; charset=iso-8859-1
  140.  
  141. With the default value, Off, URLs which contain encoded path separators (%2F for / and additionally %5C for on according systems) are refused with a 404 (Not found) error.
  142.  
  143. [Mon Mar 10 04:53:43 2014] [info] [client 172.17.1.49] found %2f (encoded '/') in URI (decoded='//'), returning 404
  144.  
  145. <IfModule mod_negotiation.c>
  146. <IfModule mod_include.c>
  147. <Directory "/usr/share/apache2/error">
  148. AllowOverride None
  149. Options IncludesNoExec
  150. AddOutputFilter Includes html
  151. AddHandler type-map var
  152. Order allow,deny
  153. Allow from all
  154. LanguagePriority en cs de es fr it ja ko nl pl pt-br ro sv tr
  155. ForceLanguagePriority Prefer Fallback
  156. </Directory>
  157.  
  158. ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
  159. ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
  160. ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
  161. ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
  162. ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
  163. ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
  164. ErrorDocument 410 /error/HTTP_GONE.html.var
  165. ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
  166. ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
  167. ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
  168. ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
  169. ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
  170. ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
  171. ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
  172. ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
  173. ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
  174. ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
  175. </IfModule>
  176. </IfModule>
  177.  
  178. 172.17.1.49 - - [10/Mar/2014:04:04:23 +0000] [rhodecode.mydomain.com/sid#7f98fedd7f00][rid#7f98f91fe7a0/initial/redir#1] (2) init rewrite engine with requested uri /error/HTTP_NOT_FOUND.html.var
  179.  
  180. RewriteEngine On
  181. RewriteCond %{HTTPS} off
  182. RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
  183. AllowEncodedSlashes NoDecode
  184.  
  185. <IfModule !mod_include.c>
  186.  
  187. 172.17.1.49 - - [10/Mar/2014:04:55:40 +0000] [rhodecode.mydomain.com/sid#7f9fd1f83f00][rid#7f9fcc3a90a0/initial] (2) init rewrite engine with requested uri /%2F
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement