VPS侦探论坛

 找回密码
 注册
查看: 6611|回复: 2

各位大大, 求求帮忙 真诚的求帮忙

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


求救!! 急!!  求。。。



问题:  nginx反向代理  discuz 2.0不能发帖   


   apache 88端口网站: http://web.ahbb.com:88
   nginx 80端口反向代理域名: http://web.ahbb.com
  测试账号 admin  admin




http.conf 配置:

  1. ServerRoot "/usr/local/apache"
  2. Listen 88
  3. <IfModule !mpm_netware_module>
  4. <IfModule !mpm_winnt_module>
  5. User www
  6. Group www
  7. </IfModule>
  8. </IfModule>
  9. #ServerName ahbb.com:88
  10. DocumentRoot "/home/wwwroot"
  11. <Directory />
  12.     Options ExecCGI FollowSymLinks Includes IncludesNOEXEC -Indexes -MultiViews SymLinksIfOwnerMatch
  13.     AllowOverride All
  14.     Order allow,deny
  15.     Allow from all
  16. </Directory>
  17. <Directory "/home/wwwroot">
  18.        Options Indexes -Indexes FollowSymLinks
  19.     #
  20.     # AllowOverride controls what directives may be placed in .htaccess files.
  21.     # It can be "All", "None", or any combination of the keywords:
  22.     #   Options FileInfo AuthConfig Limit
  23.     #
  24.     AllowOverride All
  25.     #
  26.     # Controls who can get stuff from this server.
  27.     #
  28.     Order allow,deny
  29.     Allow from all
  30. </Directory>
  31. #
  32. # DirectoryIndex: sets the file that Apache will serve if a directory
  33. # is requested.
  34. #
  35. <IfModule dir_module>
  36.     DirectoryIndex index.html index.htm index.shtml index.php index.perl index.pl index.cgi
  37. </IfModule>
  38. #
  39. # The following lines prevent .htaccess and .htpasswd files from being
  40. # viewed by Web clients.
  41. #
  42. <FilesMatch "^\.ht">
  43.     Order allow,deny
  44.     Deny from all
  45.     Satisfy All
  46. </FilesMatch>
  47. ErrorLog "logs/error_log"
  48. LogLevel warn
  49. <IfModule log_config_module>
  50.     LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined
  51.     LogFormat "%h %l %u %t "%r" %>s %b" common
  52.     <IfModule logio_module>
  53.       # You need to enable mod_logio.c to use %I and %O
  54.       LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" %I %O" combinedio
  55.     </IfModule>
  56.        CustomLog "logs/access_log" common
  57.        #CustomLog "logs/access_log" combined
  58. </IfModule>
  59. <IfModule alias_module>
  60.     ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
  61. </IfModule>
  62. <IfModule cgid_module>
  63. </IfModule>
  64. <Directory "/usr/local/apache/cgi-bin">
  65.     AllowOverride None
  66.     Options None
  67.     Order allow,deny
  68.     Allow from all
  69. </Directory>
  70. #
  71. # DefaultType: the default MIME type the server will use for a document
  72. # if it cannot otherwise determine one, such as from filename extensions.
  73. # If your server contains mostly text or HTML documents, "text/plain" is
  74. # a good value.  If most of your content is binary, such as applications
  75. # or images, you may want to use "application/octet-stream" instead to
  76. # keep browsers from trying to display binary files as though they are
  77. # text.
  78. #
  79. DefaultType text/plain
  80. RewriteEngine on
  81. AddType text/html .shtml
  82. AddHandler cgi-script .cgi .pl .plx .ppl .perl
  83. AddHandler server-parsed .shtml
  84. <IfModule mime_module>
  85.     #
  86.     # TypesConfig points to the file containing the list of mappings from
  87.     # filename extension to MIME-type.
  88.     #
  89.     TypesConfig conf/mime.types
  90.     #
  91.     # AddType allows you to add to or override the MIME configuration
  92.     # file specified in TypesConfig for specific file types.
  93.     #
  94.     #AddType application/x-gzip .tgz
  95.     #
  96.     # AddEncoding allows you to have certain browsers uncompress
  97.     # information on the fly. Note: Not all browsers support this.
  98.     #
  99.     #AddEncoding x-compress .Z
  100.     #AddEncoding x-gzip .gz .tgz
  101.     #
  102.     # If the AddEncoding directives above are commented-out, then you
  103.     # probably should define those extensions to indicate media types:
  104.     #
  105.     AddType application/x-compress .Z
  106.     AddType application/x-gzip .gz .tgz
  107.     #
  108.     # AddHandler allows you to map certain file extensions to "handlers":
  109.     # actions unrelated to filetype. These can be either built into the server
  110.     # or added with the Action directive (see below)
  111.     #
  112.     # To use CGI scripts outside of ScriptAliased directories:
  113.     # (You will also need to add "ExecCGI" to the "Options" directive.)
  114.     #
  115.     #AddHandler cgi-script .cgi
  116.     # For type maps (negotiated resources):
  117.     #AddHandler type-map var
  118.     #
  119.     # Filters allow you to process content before it is sent to the client.
  120.     #
  121.     # To parse .shtml files for server-side includes (SSI):
  122.     # (You will also need to add "Includes" to the "Options" directive.)
  123.     #
  124.     #AddType text/html .shtml
  125.     #AddOutputFilter INCLUDES .shtml
  126.     AddType application/perl .pl .plx .ppl .perl
  127.     AddType application/x-img .img
  128.     AddType application/x-httpd-php .php .php3 .php4 .php5 .php6
  129.     AddType application/x-httpd-php-source .phps
  130.     AddType application/cgi .cgi
  131.     AddType text/x-sql .sql
  132.     AddType text/x-log .log
  133.     AddType text/x-config .cnf conf
  134.     AddType text/x-registry .reg
  135.     AddType text/html .shtml
  136.     AddType application/x-tar .tgz
  137.     AddType application/rar .rar
  138.     AddType application/x-compressed .rar
  139.     AddType application/x-rar .rar
  140.     AddType application/x-rar-compressed .rar
  141.     AddType text/vnd.wap.wml .wml
  142. </IfModule>
  143. #
  144. # The mod_mime_magic module allows the server to use various hints from the
  145. # contents of the file itself to determine its type.  The MIMEMagicFile
  146. # directive tells the module where the hint definitions are located.
  147. #
  148. #MIMEMagicFile conf/magic
  149. #
  150. # Customizable error responses come in three flavors:
  151. # 1) plain text 2) local redirects 3) external redirects
  152. #
  153. # Some examples:
  154. #ErrorDocument 500 "The server made a boo boo."
  155. #ErrorDocument 404 /missing.html
  156. #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
  157. #ErrorDocument 402 http://www.example.com/subscription_info.html
  158. #
  159. #
  160. # EnableMMAP and EnableSendfile: On systems that support it,
  161. # memory-mapping or the sendfile syscall is used to deliver
  162. # files.  This usually improves server performance, but must
  163. # be turned off when serving from networked-mounted
  164. # filesystems or if support for these functions is otherwise
  165. # broken on your system.
  166. #
  167. #EnableMMAP off
  168. #EnableSendfile off
  169. # LoadModule perl_module modules/mod_perl.so
  170. LoadModule php5_module        modules/libphp5.so
  171. Include conf/extra/rpaf.conf
  172. # Supplemental configuration


  173. Include conf/extra/httpd-mpm.conf

  174. Include conf/extra/httpd-multilang-errordoc.conf

  175. Include conf/extra/httpd-autoindex.conf

  176. Include conf/extra/httpd-languages.conf

  177. Include conf/extra/httpd-info.conf

  178. Include conf/extra/httpd-vhosts.conf
  179. Include conf/extra/httpd-default.conf
  180. Include conf/vhost/*.conf

复制代码



apache虚拟主机配置:

  1. ServerAdmin webmaster@example.com
  2. php_admin_value open_basedir "/home/wwwroot:/tmp/:/var/tmp/:/proc/"
  3. DocumentRoot "/home/wwwroot"
  4. ServerName test.ahbb.com
  5. ServerAlias web.ahbb.com
  6. #ErrorLog "logs/-error_log"
  7. #CustomLog "logs/-access_log" common
复制代码




nginx配置文件:

  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 process.
  6. worker_rlimit_nofile 51200;

  7. events
  8. {
  9. use epoll;
  10. worker_connections 51200;
  11. }

  12. http
  13. {
  14. include mime.types;
  15. default_type application/octet-stream;

  16. server_names_hash_bucket_size 128;
  17. client_header_buffer_size 32k;
  18. large_client_header_buffers 4 32k;
  19. client_max_body_size 50m;

  20. sendfile on;
  21. tcp_nopush on;

  22. keepalive_timeout 60;

  23. tcp_nodelay on;

  24. fastcgi_connect_timeout 300;
  25. fastcgi_send_timeout 300;
  26. fastcgi_read_timeout 300;
  27. fastcgi_buffer_size 64k;
  28. fastcgi_buffers 4 64k;
  29. fastcgi_busy_buffers_size 128k;
  30. fastcgi_temp_file_write_size 256k;

  31. gzip on;
  32. gzip_min_length 1k;
  33. gzip_buffers 4 16k;
  34. gzip_http_version 1.0;
  35. gzip_comp_level 2;
  36. gzip_types text/plain application/x-javascript text/css application/xml;
  37. gzip_vary on;

  38. #limit_zone crawler $binary_remote_addr 10m;





  39. include vhost/*.conf;
  40. }
复制代码



nginx虚机配置:
  1. server
  2. {
  3. listen 80;
  4. server_name test.ahbb.com web.ahbb.com;
  5. index index.html index.htm index.php default.html default.htm default.php;
  6. root /home/wwwroot;

  7. location / {
  8. try_files $uri @apache;
  9. }

  10. location @apache {
  11. internal;
  12. proxy_pass http://127.0.0.1:88;
  13. include proxy.conf;
  14. }

  15. location ~ .*\.(php|php5)?$
  16. {
  17. proxy_pass http://127.0.0.1:88;
  18. include proxy.conf;
  19. }


  20. location ~ .*\.(js|css)?$
  21. {
  22. expires 12h;
  23. }

  24. access_log off;
  25. }
复制代码
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-8-30 21:35:53 | 显示全部楼层


求帮忙             急用
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2011-9-5 21:10:44 | 显示全部楼层

粗略看了配置文件,没问题也
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-12-30 01:48 , Processed in 0.025886 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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