AMH 社区首页
AMH社区 - 开放自由有价值的社区
[求助帖] 请问网站和AMH全部打不开了 |
|
---|---|
zyk715 |
zyk715 发表于 2015-12-31 01:13:35
本帖最后由 zyk715 于 2015-12-31 01:15 编辑
if ( $host= 'XXXXXXXX.com' )
{ rewrite ^/(.*)$ http://www.XXXXXX.com/$1 permanent; } if ( $host = 'bbs.XXXXXXXX.com' ){ set $subdomain "/bbs"; } rewrite ^([^\.]*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2 last; rewrite ^([^\.]*)/article-([0-9]+)-([0-9]+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3 last; rewrite ^([^\.]*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last; rewrite ^([^\.]*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last; rewrite ^([^\.]*)/group-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3 last; rewrite ^([^\.]*)/space-(username|uid)-(.+)\.html$ $1/home.php?mod=space&$2=$3 last; rewrite ^([^\.]*)/blog-([0-9]+)-([0-9]+)\.html$ $1/home.php?mod=space&uid=$2&do=blog&id=$3 last; rewrite ^([^\.]*)/(fid|tid)-([0-9]+)\.html$ $1/index.php?action=$2&value=$3 last; rewrite ^([^\.]*)/([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html$ $1/plugin.php?id=$2:$3 last; if (!-e $request_filename) { return 404; } rewrite ^([^\.]*)/tags-(.+?)-(.+?)\.html$ $1/e/tags/index.php?tagname=$2&page=$3 last; rewrite ^([^\.]*)/my([0-9]+)/$ $1/e/space/index.php?userid=$2 last; rewrite ^([^\.]*)/my([0-9]+)/(UserInfo|gbook)\.html$ $1/e/space/$3.php?userid=$2 last; rewrite ^([^\.]*)/my([0-9]+)/list-([0-9]+)\.html$ $1/e/space/list.php?userid=$2&mid=$3 last; rewrite ^([^\.]*)/my([0-9]+)/list-([0-9]+)-([0-9]+)\.html$ $1/e/space/list.php?userid=$2&mid=$3&page=$4 last; ------------- user www www; worker_processes auto; error_log /home/wwwroot/index/log/nginx_error.log crit; pid /usr/local/nginx/logs/nginx.pid; #Specifies the value for maximum file descriptors that can be opened by this process. worker_rlimit_nofile 51200; events { use epoll; worker_connections 51200; } http { include mime.types; default_type application/octet-stream; server_names_hash_bucket_size 128; client_header_buffer_size 32k; large_client_header_buffers 4 32k; client_max_body_size 50m; sendfile on; tcp_nopush on; keepalive_timeout 60 60; fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300; fastcgi_buffer_size 16k; fastcgi_buffers 16 16k; fastcgi_busy_buffers_size 16k; fastcgi_temp_file_write_size 16k; fastcgi_intercept_errors on; tcp_nodelay on; server_tokens off; gzip on; gzip_min_length 1000; gzip_proxied expired no-cache no-store private auth; gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml application/rss+xml application/xhtml+xml application/atom_xml; gzip_disable "MSIE [1-6].(?!.*SV1)"; log_format access '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" $http_x_forwarded_for'; include vhost/*.conf; server { listen 51715; server_name *.badu.com www.baidu.com baidu.com 115.28.175.235; index index.html index.htm index.php; root /home/wwwroot/index/web; if ( $host != '*.baidu.com' ) { return 400; } fastcgi_buffer_size 40k; fastcgi_buffers 8 40k; fastcgi_busy_buffers_size 40k; gzip on; location ~ .*\.php$ { fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_index index.php; include fcgi.conf; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|js|css)$ { expires 30d; gzip on; fastcgi_intercept_errors on; sendfile on; tcp_nodelay on; gzip_min_length 16k; gzip_buffers 4 16k; gzip_comp_level 2; gzip_types text/plain text/css text/xml text/vnd.wap.wml text/x-component application/x-javascript image/gif image/jpeg application/atom+xml application/rss+xml application/octet-stream application/x-rar-compressed; gzip_vary on; } location ~ .*\.(js|css)?$ { expires 30d; } access_log /home/wwwroot/index/log/access.log combined; error_log /home/wwwroot/index/log/error.log crit; } server { listen 8080 default; return 400; } }
点赞,加油! (0分)
2015-12-31 01:13:35 1
|
dongshan8 |
楼主您好,
好象是由于站点的rewrite配置文件错误导致nginx启动失败喔。 现在查看您的站点,已经恢复正常了。
回复
2016-01-08 19:57:43 2
|