lundi 17 novembre 2014

Url become force download when use Larvel homestead


Vote count:

0




I installed Homestead for develops Laravel, there is the configurations:


Homestead.yaml



---
ip: "192.168.10.14"
memory: 1024
cpus: 1

authorize: C:/Users/chan/.ssh/id_rsa.pub

keys:
- C:/Users/chan/.ssh/id_rsa

folders:
- map: 'D:/vm/laravel'
to: /home/vagrant/www

sites:
- map: laravel.app
to: /home/vagrant/www/laravel/public
- map: pma.app
to: /home/vagrant/www/pma

variables:
- key: APP_ENV
value: local


laravel.app in /etc/nginx/sites-enabled



server {
listen 80;
server_name laravel.app;
root /home/vagrant/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 off;
error_log /var/log/nginx/laravel.app-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;
}
}


C:\windows\system32\drivers


192.168.10.14 laravel.app


The result is:



  1. http://192.168.1.10 work!

  2. http://ift.tt/1uDF7uC work!

  3. http://laravel.app force download index.php


I almost did not edit any config, how to make the address link to public without index.php?



asked 39 secs ago

Chan

209






Url become force download when use Larvel homestead

Aucun commentaire:

Enregistrer un commentaire