php - Unable to get rewriting workingly properly on nginx for laravel -
i looking configuring nginx allow laravel routes work correctly, have found numerous tutorials giving different ways no avail.
following: nginx configuration laravel 4 seems quite close need, getting error no input file specified.
when error log can see instead of route going eg /url/index.php/args instead being routed /url/args/index.php
this nginx app configuration file, , it's need make work, and, nginx doesn't make use of .htaccess:
server { listen 80; server_name laravel.dev; root /var/www/laravel/public/; index index.html index.htm index.php; charset utf-8; location / { try_files $uri $uri/ /index.php?$query_string; } location = /favicon.ico { access_log off; log_not_found off; } location = /robots.txt { access_log off; log_not_found off; } access_log /var/log/nginx/laravel.dev-access.log combined; error_log /var/log/nginx/laravel.dev-error.log error; error_page 404 /index.php; sendfile off; location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } location ~ /\.ht { deny all; } }
Comments
Post a Comment