2016-08-11 5 views
2

Я обволакиваю голову за последние 2 недели.Развертывание laravel на NAS

Я пытаюсь развернуть мое приложение laravel 4.2 на своем сервере, но не могу пройти мимо домашней страницы. Все это отлично работало на моем локальном хосте.

Когда я нажимаю на ссылку, я получаю ошибку 404.

Я уже установил свой файл httpd.conf: AllowOverwride All Также я поместил файл htacces в общую папку.

Мой routes.php:

 Route::get('/', function() 
{ 
    return View::make('index'); 
}); 


//Contact Page 
Route::get('contact', '[email protected]'); 
Route::resource('producten','ProductsController'); 
//Form request:: POST action will trigger to controller 
Route::post('contact_request','[email protected]'); 
Route::get('info', function() 
{ 
    return View::make('info'); 
}); 

Route::get('diensten', function() 
{ 
    return View::make('diensten'); 
}); 

Route::get('tarieven', function() 
{ 
    return View::make('tarieven'); 
}); 

Кусок файла paths.php:

|-------------------------------------------------------------------------- 
    | 
    | The public path contains the assets for your web application, such as 
    | your JavaScript and CSS files, and also contains the primary entry 
    | point for web requests into these applications from the outside. 
    | 
    */ 

    'public' => __DIR__.'/../public', 

    /* 
    |-------------------------------------------------------------------------- 
    | Base Path 
    |-------------------------------------------------------------------------- 
    | 
    | The base path is the root of the Laravel installation. Most likely you 
    | will not need to change this value. But, if for some wild reason it 
    | is necessary you will do so here, just proceed with some caution. 
    | 

htacces файла:

<IfModule mod_rewrite.c> 
    <IfModule mod_negotiation.c> 
     Options -MultiViews 
    </IfModule> 
Options +FollowSymLinks 
    RewriteEngine On 
RewriteBase/
    # Redirect Trailing Slashes If Not A Folder... 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteRule ^(.*)/$ /$1 [L,R=301] 

    # Handle Front Controller... 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteRule^public/index.php [L] 

    # Handle Authorization Header 
    RewriteCond %{HTTP:Authorization} . 
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 
</IfModule> 

часть файла httpd.conf:

User http 
Group http 

NameVirtualHost *:80 
NameVirtualHost *:443 

ServerAdmin admin 
ServerName * 

<VirtualHost _default_:80 _default_:443> 
DocumentRoot "/var/services/web/pcvoorne.nl/public" 
Include conf/extra/mod_fastcgi.conf 
</VirtualHost> 

<Directory /> 
    Options FollowSymLinks 
    AllowOverride All 
</Directory> 

<Directory "/var/services/web"> 
    Options MultiViews FollowSymLinks ExecCGI 
    AllowOverride All 
    Order allow,deny 
    Allow from all 
</Directory> 

<IfModule dir_module> 
    DirectoryIndex index.html index.htm index.cgi index.php index.php5 
</IfModule> 

<FilesMatch "^\.ht"> 
    Order allow,deny 
    Deny from all 
    Satisfy All 
</FilesMatch> 

ErrorLog /run/apache22-error_log 
#ErrorLog /dev/null 
TraceEnable off 

Что мне не хватает, чтобы сделать эту работу? Надеюсь, вы можете мне помочь :)

ответ

0

Извините, что нужно подтвердить: установлен ли mod_rewrite? Было бы здорово увидеть более подробную информацию о ошибке 404. Вы видите индекс в '/'?