Nginx в связке с Apache и modrewrite

Пример конфига nginx /etc/nginx/vhosts/mysite/

 

server {
    server_name fishingdv.ru www.fishingdv.ru;
    charset WINDOWS-1251;
    index index.html index.php;
    disable_symlinks if_not_owner from=$root_path;
    include /etc/nginx/vhosts-includes/*.conf;
    include /etc/nginx/vhosts-resources/fishingdv.ru/*.conf;
    set $root_path /var/www/fishingdv/data/www/fishingdv.ru;
    root $root_path;
    listen IPсервера:80;
    location / {
        location ~ [^/]\.ph(p\d*|tml)$ {
           
            try_files /does_not_exists @fallback;
        }
       
        location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
            try_files $uri $uri/ @fallback;
            expires 30m;
        }
        location / {
            try_files /does_not_exists @fallback;
        }
    }
    gzip on;
    gzip_comp_level 3;
    gzip_disable "msie6";
    gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
    location @fallback {
        proxy_pass http://127.0.0.1:8080;
        proxy_redirect http://127.0.0.1:8080 /;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        access_log off;
    }
    access_log /var/www/httpd-logs/fishingdv.ru.access.log;
    error_log /dev/null crit;
}

Далее добавлеям в apache hosts AllowOverride all

 






У данной записи пока нет ниодного комментария