2015-02-01 2 views
0

JobberBase라는 스크립트를 설치하려고했지만 성공적으로 수행하지 못했습니다 ... 문제는 내 홈 페이지가 정상적으로로드되지만 링크를 클릭하면 페이지가 ' t 존재 ... 여기 살아있는 예입니다 : http://onboardcloud.com 이 내 설정 파일입니다페이지가 존재하지 않습니다. 오류

<?php 
/** 
* Define environments 
* 
*/ 

// local 
$__instances['local'] = array(
    // The prefix should be a unique part of the url (not including protocol name or auth info; see below). 
    'prefix' => 'localhost', 
    // mysql credentials 
    'db_host' => 'localhost', 
    'db_port' => 3306, 
    'db_user' => 'root', 
    'db_password' => 'password', 
    'db_name' => 'jobberbase', 
    'db_prefix' => '', 
    // your site's full url 
    'app_url' => 'http://localhost/', 
    // language to use 
    'lang_code' => 'en', 
    // error reporting 
    'ini_error_reporting' => E_ALL, 
    'ini_display_errors' => 'On', 
    // environment setting 1 (use 'local' for localhost/testing OR 'online' for live, production environment) 
    'location' => 'online', 
    // environment setting 2 (use 'dev' together with 'local' in the previous setting OR 'prod' with 'online') 
    'environment' => 'prod', 
    //'apache_mod_rewrite', 'iis_url_rewrite' -microsoft URL Rewrite module, 'iis_isapi_rewrite' 
    'rewrite_mode' => 'apache_mod_rewrite' 
); 

// live 
$__instances['live'] = array(
    'prefix' => 'onboardcloud.com', 
    'db_host' => 'localhost', 
    'db_port' => 3306, 
    'db_user' => 'root', 
    'db_password' => 'password', 
    'db_name' => 'jobberbase', 
    'db_prefix' => '', 
    'app_url' => 'http://onboardcloud.com/', 
    // language to use 
    'lang_code' => 'en', 
    'ini_error_reporting' => E_ALL, 
    'ini_display_errors' => 'Off', 
    'location' => 'online', 
    'environment' => 'prod', 
    'rewrite_mode' => 'apache_mod_rewrite' 
); 


// http requests 
if (isset($_SERVER['HTTP_HOST']) && isset($_SERVER['REQUEST_URI'])) 
{ 
    $_compare_to = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; 
} 

// setup current instance 
foreach ($__instances as $__instance) 
{ 
    if (strstr($_compare_to, $__instance['prefix'])) 
    { 
     define('DB_HOST', $__instance['db_host']); 
     define('DB_PORT', $__instance['db_port']); 
     define('DB_USER', $__instance['db_user']); 
     define('DB_PASS', $__instance['db_password']); 
     define('DB_NAME', $__instance['db_name']); 
     define('DB_PREFIX', $__instance['db_prefix']); 

     // values kind of redundant, they indicate wether this is a live/production or dev/testing environment 
     define('LOCATION', $__instance['location']); 
     define('ENVIRONMENT', $__instance['environment']); 

     $app_url = $__instance['app_url']; 

     $indexOfLastSlash = strrpos($app_url, "/"); 
     $expectedIndexOfLastSlash = strlen($app_url) - 1; 

     // manually add an ending slash to the app_url if the user didn't specify it 
     if ($indexOfLastSlash && $indexOfLastSlash != $expectedIndexOfLastSlash) 
      $app_url .= '/'; 

     // base url of the app 
     define('APP_URL', $app_url); 
     define('REWRITE_MODE', $__instance['rewrite_mode']); 

     // error reporting 
     ini_set('error_reporting', $__instance['ini_error_reporting']); 
     ini_set('display_errors', $__instance['ini_display_errors']); 

     define('LANG_CODE', $__instance['lang_code']); 

     break; 
    } 
} 

if(!defined('DB_HOST')) 
{ 
    die('None of the configured JobberBase instances matched your request!<br />If you are an admin of this JobberBase installation, you may want to review the \'prefix\' values of the configured JobberBase instances in config.envs.php.'); 
} 
?> 

그리고 이것은 내 htaccess로 파일입니다 제가 서버로 우분투를 사용하고

ErrorDocument 404 /page-unavailable/ 

<files ~ "\.tpl$"> 
order deny,allow 
allow from all 
deny from none 
AllowOverride All 
</files> 
<Directory /var/www/> 
       Options Indexes FollowSymLinks MultiViews 
       AllowOverride All 
       Order allow,deny 
       allow from all 
</Directory> 
RewriteEngine on 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . index.php [L] 

. 저는 Apache2, PHP, MySQL, suPHP 및 PHPmyAdmin을 설치했습니다. 도움이 될 것입니다.

+0

아파치 설정'AllowOverride All'에서 htaccess를 사용할 수 있다고 생각하지 않습니다. 왜냐하면 당신은 내부 서버 오류가 발생했기 때문입니다. 'Directory' 지시어는 .htaccess에서 사용할 수 없습니다. 귀하의 htaccess는 매우 잘못되었습니다. –

+0

@PanamaJack 고마워,하지만 어떻게 고칠 수 있니? 대답을 남겨두고 작동하면 받아 들일 수 있겠습니까?) –

답변

1

나는 jobberbase를 모르지만 htaccess 파일은 이와 같이 보일 것입니다.

RewriteEngine on 
Options +FollowSymlinks 

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . index.php [L] 

ErrorDocument 404 /page-unavailable/ 

<Files ~ "\.tpl$"> 
order deny,allow 
deny from all 
</Files> 

그리고이 내용은 Apache vhost 구성 파일에 있어야합니다. 우분투에서는 /etc/apache2/sites-available/default입니다. 기본값이 아니라면 사이트에서 귀하의 사이트를 호출 한 디렉토리 (사용 가능한 디렉토리). 그것은 아무것도 변경할 필요가 다음 이미 없다, 그냥 있는지 확인 AllowOverride는 그런 다음 가상 호스트 파일을 업데이트 할 경우 아파치를 다시 시작해야합니다 All

<Directory /var/www/> 
    Options Indexes FollowSymLinks MultiViews 
    AllowOverride All 
    Order allow,deny 
    allow from all 
</Directory> 

로 설정됩니다.

+0

그래, 고마워, 이제 해보려고. –

+0

안녕! 여전히 작동하지 않는 것 같습니다 ... .htaccess를 변경하고/etc/apache2/sites-available /에 가서 000-default.conf 파일을 편집했습니다. "AllowOverride all"라인이 없으므로 하나 추가했지만 아직 아무것도 ... 파일의 경로가 정확합니다 ... –

+0

안녕하세요! 지금 구성 파일을 활성화했는데 AllowOverride가 모두 허용되지 않는다는 오류가 표시됩니까? 감사합니다 :) –

관련 문제