Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3270521
  • 博文数量: 815
  • 博客积分: 12898
  • 博客等级: 上将
  • 技术积分: 7883
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-25 09:57
文章分类

全部博文(815)

文章存档

2014年(1)

2011年(46)

2010年(192)

2009年(121)

2008年(70)

2007年(385)

分类: LINUX

2011-09-04 16:26:55

  1. RHEL 5.4 + Nginx + Mediawiki With HTTPS
  2. # Virtual wiki.atyu30.com
  3. # Author atyu30
  4. # Date: 2011/08/31
  5. ## uname -r -m -o
  6. #2.6.18-194.el5 x86_64 GNU/Linux
  7. ## nginx -v
  8. #nginx: nginx version: nginx/1.1.1
  9. # Change 2011/09/02
  10. # MediaWiki-1.17.0 php-fpm Nginx Sphinx
  11. server {
  12. listen 443;
  13. #listen 80;
  14. server_name wiki.atyu30.com;
  15. charset utf-8;
  16. fastcgi_param HTTPS $fastcgi_https;
  17. location / {
  18. root /var/www/mediawiki-1.16.4;
  19. index index.php index.html index.htm;
  20. #将请求的不存在文件重写到index.php
  21. try_files $uri $uri/ /index.php;
  22. if (!-f $request_filename){
  23. rewrite ^/([^?]*)(?:\?(.*))? /index.php?title=$1&$2 last;
  24. rewrite (.*) /index.php;
  25. }
  26. }
  27. location ~ \.php$ {
  28. root /var/www/mediawiki-1.16.4;
  29. fastcgi_pass 127.0.0.1:9000;
  30. fastcgi_index index.php;
  31. fastcgi_intercept_errors on;
  32. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  33. include fastcgi_params;
  34. client_max_body_size 20m;
  35. }
  36. ssl on;
  37. ssl_certificate /etc/pki/tls/certs/server.crt;
  38. ssl_certificate_key /etc/pki/tls/private/server.key;
  39. ssl_session_timeout 5m;
  40. ssl_protocols SSLv2 SSLv3 TLSv1;
  41. ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
  42. ssl_prefer_server_ciphers on;
  43. }
  44. map $scheme $fastcgi_https {
  45. default off;
  46. https on;
  47. }
阅读(1097) | 评论(0) | 转发(0) |
0

上一篇:那几年的记忆

下一篇:CentOS 5.6 x64 XFS ERROR

给主人留下些什么吧!~~