2014-12-22 4 views
1

ok 이제 apache 및 nginx 프록시를 사용하여 우분투 14.4에 laravel 4.2를 설치했습니다.경로가 나를 홈 페이지로 리다이렉트 (laravel)

내가 전화 할 때 내가

Route::get('/reg', function() 
{ 
    return 'hii'; 
}); 

아파치보기 "HII"와 같은 경로를 만들 때 "로컬 호스트 : 8080/등록"

하지만 난 "로컬 호스트/등록"의를 호출 할 때의 nginx 메인 페이지를 보려면 브라우저

의 nginx의 구성 : 잘못된

server { 
     listen 80; 

     root /var/www/laravel/public; 
     index index.php index.html index.htm; 

     server_name localhost; 

     location/{ 
     try_files $uri $uri/ /index.php?$query_string; 
     } 

    if (!-d $request_filename) { 
     rewrite  ^/(.+)/$ /$1 permanent; 
    } 

     location ~ \.php$ { 

     proxy_set_header X-Real-IP $remote_addr; 
     proxy_set_header X-Forwarded-For $remote_addr; 
     proxy_set_header Host $host; 
     proxy_pass http://127.0.0.1:8080; 

     } 

# PHP FPM configuration. 
    location ~* \.php$ { 
      fastcgi_pass     unix:/var/run/php5-fpm.sock; 
      fastcgi_index     index.php; 
      fastcgi_split_path_info   ^(.+\.php)(.*)$; 
      include       /etc/nginx/fastcgi_params; 
      fastcgi_param     SCRIPT_FILENAME $document_root$fastcgi_script$ 
    } 

     location ~ /\.ht { 
       deny all; 
     } 
} 

?

답변

0

귀하의 nginx.conf에 따르면, 귀하의 /var/www/laravel/public/index.php;을로드 중입니다. 당신이이 일하지 않으려면

OR

  • 가 볼을, 당신이 load 할 파일을 nginx.conf에 경로를 조정하고 포인트 해당보기의 경로.
+0

so. 내가 뭘하는거야? !! !! –

+0

방금 ​​답변을 편집합니다. 이모, 2 가지 옵션이있어. –

관련 문제