Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. nginx (reverse-proxy) config
  2.  
  3. server {
  4. listen 80;
  5. root /var/www/html;
  6. index index.php index.html index.htm;
  7. server_name _;
  8. location / {
  9. try_files $uri $uri/ /index.php;
  10. }
  11. location ~ \.php$ {
  12. proxy_set_header X-Real-IP $remote_addr;
  13. proxy_set_header X-Forwarded-For $remote_addr;
  14. proxy_set_header Host $host;
  15. proxy_pass http://127.0.0.1:8080;
  16. }
  17. location ~ /\.ht {
  18. deny all;
  19. }
  20. }
  21.  
  22. Apache config (at end of httpd.conf)
  23.  
  24. RewriteEngine On
  25. RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/index.php [L]
  26.  
  27. RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
  28. RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
  29. RewriteRule ^/?images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2 [L,QSA,B]
  30.  
  31. RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
  32. RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
  33. RewriteRule ^/?images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2&archived=1 [L,QSA,B]
  34.  
  35. Localsettings.php settings
  36.  
  37. $wgScriptPath = "";
  38. $wgScriptExtension = ".php";
  39. $wgArticlePath = "/wiki/$1";
  40. $wgEnableUploads = true;
  41. $wgGenerateThumbnailOnParse = false;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement