全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 8810|回复: 36

[lighttpd] nginx安装WP 出现500错误

[复制链接]
发表于 2014-1-20 09:58:59 | 显示全部楼层 |阅读模式
100金钱
环境是freebsd8.4 nginx.1.0.10 mysql51-server  php5.27

上探针http://www.6rc.cc/tz.php
---------------------------------------------------------------------------


系统配置曾经编译内核提高性能
内核代码
----------------------------------------------------------------------------
# $FreeBSD: src/sys/i386/conf/GENERIC,v 1.519.2.18.2.1 2012/03/03 06:15:13 kensmith Exp $

cpu                          I486_CPU
cpu                          I586_CPU
cpu                          I686_CPU

ident                vmware

#options         PAE                # 鏀寔澶у唴瀛?
options         SCHED_ULE                # ULE scheduler
options         PREEMPTION                # Enable kernel thread preemption
options         INET                        # InterNETworking
#options         INET6                        # IPv6 communications protocols
options         SCTP                        # Stream Control Transmission Protocol
options         FFS                        # Berkeley Fast Filesystem
options         SOFTUPDATES                # Enable FFS soft updates support
options         UFS_ACL                        # Support for access control lists
options         UFS_DIRHASH                # Improve performance on big directories
options         UFS_GJOURNAL                # Enable gjournal-based UFS journaling
options         MD_ROOT                        # MD is a potential root device
options         NFSCLIENT                # Network Filesystem Client
options         NFSSERVER                # Network Filesystem Server
options         NFSLOCKD                # Network Lock Manager
options         NFS_ROOT                # NFS usable as /, requires NFSCLIENT
options         CD9660                        # ISO 9660 Filesystem
options         PROCFS                        # Process filesystem (requires PSEUDOFS)
options         PSEUDOFS                # Pseudo-filesystem framework
options         GEOM_PART_GPT                # GUID Partition Tables.
options         GEOM_LABEL                # Provides labelization
options         COMPAT_43TTY                # BSD 4.3 TTY compat (sgtty)
options         COMPAT_FREEBSD4                # Compatible with FreeBSD4
options         COMPAT_FREEBSD5                # Compatible with FreeBSD5
options         COMPAT_FREEBSD6                # Compatible with FreeBSD6
options         COMPAT_FREEBSD7                # Compatible with FreeBSD7
options         SCSI_DELAY=5000                # Delay (in ms) before probing SCSI
options         KTRACE                        # ktrace(1) support
options         STACK                        # stack(9) support
options         SYSVSHM                        # SYSV-style shared memory
options         SYSVMSG                        # SYSV-style message queues
options         SYSVSEM                        # SYSV-style semaphores
options         P1003_1B_SEMAPHORES        # POSIX-style semaphores
options         _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options         PRINTF_BUFR_SIZE=128        # Prevent printf output being interspersed.
options         KBD_INSTALL_CDEV        # install a CDEV entry in /dev
options         HWPMC_HOOKS                # Necessary kernel hooks for hwpmc(4)
options         AUDIT                        # Security event auditing
options         MAC                        # TrustedBSD MAC Framework
#options         KDTRACE_HOOKS                # Kernel DTrace hooks
options         INCLUDE_CONFIG_FILE     # Include this file in kernel
options         KDB                        # Kernel debugger related code
options         KDB_TRACE                # Print a stack trace for a panic

# Enabling ALTQ
options         ALTQ
options         ALTQ_CBQ        # Class Bases Queuing (CBQ)
options         ALTQ_RED        # Random Early Detection (RED)
options         ALTQ_RIO        # RED In/Out
options         ALTQ_HFSC       # Hierarchical Packet Scheduler (HFSC)
options         ALTQ_PRIQ       # Priority Queuing (PRIQ)
options         ALTQ_NOPCC      # Required for SMP build

# To make an SMP kernel, the next two lines are needed
options         SMP                        # Symmetric MultiProcessor Kernel
device                apic                        # I/O APIC

# CPU frequency control
device                cpufreq

# Bus support.
device                acpi
device                pci

# ATA and ATAPI devices
device                ata
device                atadisk                # ATA disk drives
device                ataraid                # ATA RAID drives
device                atapicd                # ATAPI CDROM drives
options         ATA_STATIC_ID        # Static device numbering

# SCSI Controllers
device                mpt                # LSI-Logic MPT-Fusion

# SCSI peripherals
device                scbus                # SCSI bus (required for SCSI)
device                ch                # SCSI media changers
device                da                # Direct Access (disks)
#device                sa                # Sequential Access (tape etc)
device                cd                # CD
device                pass                # Passthrough device (direct SCSI access)
device          ses             # SCSI Environmental Services (and SAF-TE)

# atkbdc0 controls both the keyboard and the PS/2 mouse
device                atkbdc                # AT keyboard controller
device                atkbd                # AT keyboard
device                psm                # PS/2 mouse
device                kbdmux                # keyboard multiplexer
device                vga                # VGA video card driver

# syscons is the default console driver, resembling an SCO console
device                sc
device                agp                # support several AGP chipsets

# PCI Ethernet NICs.
device                em                # Intel PRO/1000 Gigabit Ethernet Family


# Pseudo devices.
device                loop                # Network loopback
device                random                # Entropy device
device                ether                # Ethernet support
device                vlan                # 802.1Q VLAN support
device                tun                # Packet tunnel.
device                pty                # BSD-style compatibility pseudo ttys
device                md                # Memory "disks"
device                gif                # IPv6 and IPv4 tunneling
device                faith                # IPv6-to-IPv4 relaying (translation)
device                firmware        # firmware assist module

# Enables support for the "Packet Filter" firewall.
device        pf
device        pflog
device        pfsync
-----------------------------------------------------------------------------------------------------------------------
以上是内核代码

防火墙规则

-----------------------------------------------------------------------------------------------------------------------

#Macros
my_int = "em0"

# Let's just trust localhost
set skip on lo

# By default, we will block everyone and everything coming in
block in log all

# accept ssh sessions
pass in on $my_int proto tcp from any to any port 22 keep state

# accept http sessions
pass in on $my_int proto tcp from any to any port 80 keep state

# accept mysql sessions
pass in on $my_int proto tcp from any to any port 3306  keep state

# accept icmp sessions
pass in quick on $my_int proto icmp all keep state

# Outgoing traffic is OK, here we keep state so returning packets
# are accepted too.
pass out log proto { tcp, udp, icmp } all keep state
------------------------------------------------------

下面是nginx 配置

 楼主| 发表于 2014-1-20 10:00:05 | 显示全部楼层
user www www;

worker_processes 1;

worker_rlimit_nofile 10240;

pid /var/run/nginx.pid;
events
        {
                use kqueue;
                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 8m;

                sendfile on;
                tcp_nopush on;
                tcp_nodelay on;
                keepalive_timeout 60;

               
               
                fastcgi_connect_timeout 300;
                fastcgi_send_timeout 300;
                fastcgi_read_timeout 300;
                fastcgi_buffer_size 64k;
                fastcgi_buffers 4 64k;
                fastcgi_busy_buffers_size 128k;
                fastcgi_temp_file_write_size 256k;

                gzip on;
                gzip_min_length  1k;
                gzip_buffers     4 16k;
                gzip_http_version 1.0;
                gzip_comp_level 2;
                gzip_types       text/plain application/x-javascript text/css application/xml;
                gzip_vary on;
                gzip_proxied        expired no-cache no-store private auth;
                gzip_disable        "MSIE [1-6]\.";


                #limit_zone  crawler  $binary_remote_addr  10m;
                fastcgi_intercept_errors on;
                server_tokens off;
                #log format
                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;
          }

 楼主| 发表于 2014-1-20 10:01:05 | 显示全部楼层
server {
        listen       80;
        server_name blog.6rc.cc;
        location / {
        root   /home/wwwroot;
        index  index.html index.htm index.php default.html default.htm default.php;
         
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
         root  /usr/local/www/nginx-dist;
         }
        
        location ~ \.php$ {
         root           /home/wwwroot;
         fastcgi_pass   unix:/tmp/php-cgi.sock;
         fastcgi_index  index.php;
         include        fcgi.conf;
        
         location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
                        {
                                expires      30d;
                        }

         location ~ .*\.(js|css)?$
                        {
                                expires      1h;
                        }
                      access_log off;
                        
      
       }
  }
       


发表于 2014-1-20 10:01:31 | 显示全部楼层
请贴出php和nginx的最近日志。。。

点评

Jan 20 09:52:42.756921 [NOTICE] fpm_pctl_exit(), line 81: exiting, bye-bye! Jan 20 09:54:24.886740 [NOTICE] fpm_unix_init_main(), line 284: getrlimit(nofile): max:5421, cur:5421 Jan 20 09:54:25.181021   发表于 2014-1-20 10:08
 楼主| 发表于 2014-1-20 10:02:10 | 显示全部楼层
数据库管理能phpmyadmin 能用 http://www.6rc.cc/phpmyadmin/
 楼主| 发表于 2014-1-20 10:03:29 | 显示全部楼层
WP 安装地址
http://blog.6rc.cc//wp-admin/install.php
发表于 2014-1-20 10:04:08 | 显示全部楼层
我有次把.htaccess写错了,造成过500。。
 楼主| 发表于 2014-1-20 10:07:25 | 显示全部楼层
cgs3238 发表于 2014-1-20 10:01
请贴出php和nginx的最近日志。。。

2014/01/20 09:58:02 [error] 816#0: *76 open() "/home/www/11.tar.gz" failed (2: No such file or directory), client: 123.133.193.17, server: localhost, request: "GET /11.tar.gz HTTP/1.1", host: "www.6rc.cc"
2014/01/20 09:58:02 [error] 816#0: *77 open() "/home/www/11.tar.gz" failed (2: No such file or directory), client: 123.133.193.17, server: localhost, request: "GET /11.tar.gz HTTP/1.1", host: "www.6rc.cc"
2014/01/20 09:58:02 [error] 816#0: *78 open() "/home/www/11.tar.gz" failed (2: No such file or directory), client: 123.133.193.17, server: localhost, request: "GET /11.tar.gz HTTP/1.1", host: "www.6rc.cc"
2014/01/20 09:58:02 [error] 816#0: *79 open() "/home/www/11.tar.gz" failed (2: No such file or directory), client: 123.133.193.17, server: localhost, request: "GET /11.tar.gz HTTP/1.1", host: "www.6rc.cc"
2014/01/20 10:02:51 [error] 816#0: *83 open() "/home/www/favicon.ico" failed (2: No such file or directory), client: 60.163.247.9, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "www.6rc.cc"
2014/01/20 10:04:36 [error] 816#0: *171 open() "/home/wwwroot/favicon.ico" failed (2: No such file or directory), client: 27.23.247.243, server: blog.6rc.cc, request: "GET /favicon.ico HTTP/1.1", host: "blog.6rc.cc"
2014/01/20 10:05:05 [error] 816#0: *183 directory index of "/home/www/" is forbidden, client: 119.178.247.81, server: localhost, request: "GET / HTTP/1.1", host: "www.6rc.cc"
2014/01/20 10:05:32 [error] 816#0: *188 open() "/home/www/favicon.ico" failed (2: No such file or directory), client: 220.189.10.56, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "www.6rc.cc"
2014/01/20 10:06:17 [error] 816#0: *247 open() "/home/www/wpad.dat" failed (2: No such file or directory), client: 72.76.96.180, server: localhost, request: "GET /wpad.dat HTTP/1.1", host: "wpad.unseenkiller.com"
2014/01/20 10:06:32 [error] 816#0: *247 open() "/home/www/wpad.dat" failed (2: No such file or directory), client: 72.76.96.180, server: localhost, request: "GET /wpad.dat HTTP/1.1", host: "wpad.unseenkiller.com"
2014/01/20 10:07:33 [error] 816#0: *323 open() "/home/www/wpad.dat" failed (2: No such file or directory), client: 72.76.96.180, server: localhost, request: "GET /wpad.dat HTTP/1.1", host: "wpad.unseenkiller.com"
发表于 2014-1-20 10:07:45 | 显示全部楼层
hcw1588 发表于 2014-1-20 10:04
我有次把.htaccess写错了,造成过500。。

+1 遇到过几次

点评

我是新安装的  发表于 2014-1-20 10:11
发表于 2014-1-20 10:14:04 | 显示全部楼层
我就是新安装的时候遇到的
你试试先把伪静态规则弄好试试

点评

OK  发表于 2014-1-20 10:18
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-5-11 01:03 , Processed in 0.063446 second(s), 7 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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