Ja na production serverima koristim nginx + php-fpm i radi super.
Evo primera vhost-a sa rewrite-om:
Kôd:
server {
listen 80;
server_name www.demo.com;
location / {
root /home/deployment/dev/web/public;
index index.html index.php;
# if file exists return it right away
if (-f $request_filename) {
break;
}
# this rewrites all the requests to the maintenance.html
# page if it exists in the doc root.
if (-f $document_root/maintenance.html) {
rewrite ^(.*)$ /maintenance.html last;
break;
}
if (!-e $request_filename) {
rewrite ^(.+)$ /index.php?uri=$1 last;
break;
}
}
location ~ .php$ {
fastcgi_pass 127.0.0.1:4000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/deployment/dev/web/public$fastcgi_script_name;
include /etc/nginx/conf/fastcgi_params;
}
}
No input file specified gresku sam dobijao u slucaju kada fast cgi param SCRIPT_FILENAME nije bio dobar.
Moj predlog ti je da izbegnes apache, a ukoliko ne mozes onda nginx, lighttpd kao reverse proxy ka apache-u.