我正在运行带有 nginx 的 FreeBSD 9-Stable 服务器。
我的配置在这里:
user www www;
worker_processes 5;
error_log /var/log/nginx/nginx-error.log;
events {
worker_connections 1024;
}
http {
include mime.types;
include fastcgi_params;
index index.html index.htm index.php;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] $status '
'"$request" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
sendfile on;
autoindex on;
tcp_nopush on;
tcp_nodelay on;
ignore_invalid_headers on;
gzip on;
server {
listen 127.0.0.1;
server_name localhost;
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}
}
server {
listen 80; …Run Code Online (Sandbox Code Playgroud)