0

我想设置我的 nginx.conf 和 .htacccess(codeigniter) 我尝试在我的 nginx.conf 中设置重写,但没有成功,

这是我的 nginx.conf

worker_processes  4;
events {
    worker_connections  1024;
}

http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
server_tokens off;

include mime.types;
default_type text/plain;

log_format gzip '$remote_addr - $remote_user [$time_local]  '
                '"$request" $status $bytes_sent '
                '"$http_referer" "$http_user_agent" "$gzip_ratio"';

access_log /usr/local/logs/nginx/access.log gzip buffer=32k;
error_log /usr/local/logs/nginx/error.log notice;

gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

server {
listen 80;
server_name localhost;
root /usr/local/var/www;
index  index.php index.html;

location ~ \.php$ {
fastcgi_pass unix:/tmp/php-fpm.sock;
}

include fastcgi_params;
}

include /usr/local/etc/nginx/conf.d/*;
include /usr/local/etc/nginx/sites-enabled/*;

}

对于这种情况,我的 .htaccess 文件是空的,任何人都可以帮助我......

谢谢

4

0 回答 0