VPS侦探论坛

 找回密码
 注册
查看: 6583|回复: 1

不知什么原因,nginx启用ssl后会从http访问自动转到https

[复制链接]
发表于 2011-11-23 19:03:15 | 显示全部楼层 |阅读模式

安装包是lnmp0.7
更新到1.0.10

http访问phpmyadmin
http://www.hyde-boa.org/phpmyadm1n/

按登录会跳转为https,但端口是80,出错。
https://www.hyde-boa.org:80/phpmyadm1n/index.php?lang=zh-utf-8&

wordpress的话,站内的超链接也会自动变成https://
http://www.hyde-boa.org/blog/
siteurl和home已经是    http://www.hyde-boa.org/blog

求解。
  1. user www www;



  2. worker_processes 1;



  3. error_log /home/wwwlogs/nginx_error.log crit;



  4. pid /usr/local/nginx/logs/nginx.pid;



  5. #Specifies the value for maximum file descriptors that can be opened by this
  6. process.

  7. worker_rlimit_nofile 51200;



  8. events

  9. {

  10. use epoll;

  11. worker_connections 51200;

  12. }



  13. http

  14. {

  15. include mime.types;

  16. default_type application/octet-stream;



  17. server_names_hash_bucket_size 128;

  18. client_header_buffer_size 32k;

  19. large_client_header_buffers 4 32k;

  20. client_max_body_size 50m;



  21. sendfile on;

  22. tcp_nopush on;



  23. keepalive_timeout 60;



  24. tcp_nodelay on;



  25. fastcgi_connect_timeout 300;

  26. fastcgi_send_timeout 300;

  27. fastcgi_read_timeout 300;

  28. fastcgi_buffer_size 64k;

  29. fastcgi_buffers 4 64k;

  30. fastcgi_busy_buffers_size 128k;

  31. fastcgi_temp_file_write_size 256k;



  32. gzip on;

  33. gzip_min_length 1k;

  34. gzip_buffers 4 16k;

  35. gzip_http_version 1.0;

  36. gzip_comp_level 2;

  37. gzip_types text/plain application/x-javascript text/css application/xml;

  38. gzip_vary on;



  39. #limit_zone crawler $binary_remote_addr 10m;



  40. server

  41. {

  42. listen 80;

  43. listen 443 ssl;

  44. server_name www.hyde-boa.org;

  45. index index.html index.htm index.php;

  46. root /home/wwwroot;



  47. # ssl on;

  48. ssl_certificate /home/ssl/hyde-boa.crt;

  49. ssl_certificate_key /home/ssl/hyde-boa.key;

  50. ssl_session_timeout 5m;



  51. ssl_protocols SSLv2 SSLv3 TLSv1;

  52. ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;

  53. ssl_prefer_server_ciphers on;



  54. location ~ .*\.(php|php5)?$

  55. {

  56. fastcgi_pass unix:/tmp/php-cgi.sock;

  57. fastcgi_index index.php;

  58. include fcgi.conf;

  59. fastcgi_param HTTPS on;

  60. }



  61. location /status {

  62. stub_status on;

  63. access_log off;

  64. }



  65. location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$

  66. {

  67. expires 4h;

  68. }



  69. location ~ .*\.(js|css)?$

  70. {

  71. expires 12h;

  72. }



  73. log_format access '$remote_addr - $remote_user [$time_local]
  74. "$request" '

  75. '$status $body_bytes_sent "$http_referer" '

  76. '"$http_user_agent" $http_x_forwarded_for';

  77. access_log /home/wwwlogs/access.log access;

  78. }

  79. include vhost/*.conf;

  80. }
复制代码

[ 本帖最后由 niclau 于 2011-11-23 19:07 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2011-11-24 11:41:19 | 显示全部楼层


80和443分开试试
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-11-16 03:33 , Processed in 0.025260 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表