2015-01-16 6 views
1

디지털 바다 계정에 새로운 laravel 앱을 배포하는 데 문제가 있습니다. http://davidmyers.name/post/laravel-on-digital-ocean디지털 오션 배포 Laravel

그러나 나는 인덱스 페이지에 액세스하려고 할 때, 내가 얻을 것을 발견 :

Forbidden 

You don't have permission to access/on this server. 

Apache/2.4.7 (Ubuntu) Server at www.scheduleify.com Port 80 

그러나, 나는로 이동하여 phpMyAdmin을에게 잘 액세스 할 수 있어요 나는 단계는이 튜토리얼에서 윤곽을 따라 www.scheduleify.com/phpmyadmin

기본 디렉토리를 공용 폴더로 설정하는 것과 관련이 있다는 느낌이 들었습니다.

DocumentRoot /var/www 
<Directory /var/www> 

이 부족한 것 같습니다 내 전체 파일입니다 : /etc/apache2/sites-enabled/000-default.conf

하나는 다음 두 줄을 볼 : 위의 링크 된 기사에서

은, 저자는 파일을 열 때 있음을 언급 그 중 하나 (이미 거기에 맞게 수정했습니다) :

<VirtualHost *:80> 
     # The ServerName directive sets the request scheme, hostname and port that 
     # the server uses to identify itself. This is used when creating 
     # redirection URLs. In the context of virtual hosts, the ServerName 
     # specifies what hostname must appear in the request's Host: header to 
     # match this virtual host. For the default virtual host (this file) this 
     # value is not decisive as it is used as a last resort host regardless. 
     # However, you must set it for any further virtual host explicitly. 
     #ServerName www.example.com 

     ServerAdmin [email protected] 
     DocumentRoot /root/scheduleify/public 

     # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, 
     # error, crit, alert, emerg. 
     # It is also possible to configure the loglevel for particular 
     # modules, e.g. 
     #LogLevel info ssl:warn 

     ErrorLog ${APACHE_LOG_DIR}/error.log 
     CustomLog ${APACHE_LOG_DIR}/access.log combined 

     # For most configuration files from conf-available/, which are 
     # enabled or disabled at a global level, it is possible to 
     # include a line for only one particular virtual host. For example the 
     # following line enables the CGI configuration for this host 

only 
#Include conf-available/serve-cgi-bin.conf 
</VirtualHost> 

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet 

또 다른 사실 : 내 루트 디렉토리에 ssh를하고, 복제 된 저장소/프로젝트 폴더로 이동하고, PHP는 장인을 실행하려고하면, 나는 오류 얻을 : 나도 같은 디렉토리에서 명령 Mcrypt 라이브러리를 실행하는 경우, 그러나

Mcrypt PHP extension required. 

을, 나는 다음을 얻습니다 :

mcrypt: Encrypted data will not be written to a terminal. 
Redirect the output instead. 
Use the --help parameter for more help. 

이는 mcrypt가 작동 중임을 나타냅니다. 모든 입력/도움을 크게 주시면 감사하겠습니다. 나는 포기에 아주 가깝다, 나는 몇 시간 동안 이것에 가고있어 아무데도 얻지 않았다.


업데이트 : 첫 번째 오류가 해결되었습니다.

403 오류가 남아 있습니다. 첫 번째 문제를 들어

[Fri Jan 16 09:38:31.855624 2015] [core:error] [pid 5641] 
(13)Permission denied: [client [removed]] AH00035: access to/denied 
(filesystem path '/root/scheduleify') because search permissions are 
missing on a component of the path 
+0

가상 호스트 및 httpd.conf 파일에서'Require' 지시어를 점검하십시오. 내 경우에는 가상 호스트에서'모든 권한 부여 '로 설정됩니다. –

+0

물방울 OS는 무엇입니까? –

+0

Droplet OS는 Ubuntu에서 LAMP입니다. 어쨌든 나는이 문제를 해결했다. 나는 대답으로 내 자신의 의견을 선택한 날을 기다리고있다. – mdobrenko

답변

2

: 아파치 로그를 확인,이 오류를 발견

You don't have permission to access/on this server.

이 일반적으로 사용 권한 문제입니다. root가/root/scheduleify를 소유하고 웹 서버 (우분투 & 데비안의 www 데이터)는 그 디렉토리를 읽을 수 없습니다. 이것은 당신이해야하는 문제를 해결하지 않으면

chown -R www-data: /root/scheduleify

이 명령을 루트로 새 파일을 업로드 할 때마다를 다시 실행합니다.두번째 문제

:

apt-get install php5-mcrypt

결국 아파치를 다시 시작

Mcrypt PHP extension required.

가 고정 될 수있다. 문제는 내가 루트 디렉토리의 내부 응용 프로그램을 배치 한 것이 었습니다

sudo service apache2 restart

+0

문제가 해결되지 않은 것 같습니다. \. chown 명령을 실행했는데 403이 계속 유지됩니다. 혼란스러운 점은 실제로 mcrypt 명령이 작동하지 않는다는 것입니다. php5-mcrypt가 누락되었습니다. PHP 장인을 실행하려고 할 때 나는 여전히 같은 오류가 발생합니다. 어떤 아이디어? – mdobrenko

+0

ah 예,'php5enmod' 명령입니다. 403 오류에 대한, 나는 그들이 더 이상의 정보가 있는지 확인하기 위해 아파치 오류 로그를 확인합니다. 또한 [이 답변] (http://stackoverflow.com/questions/18447454/apache-giving-403-forbidden-errors)에서 더 많은 도움을 얻을 수 있습니다. – akuseru

0

...이 나쁜 생각입니다 추가 아파치 구성을 필요로한다.

프로젝트를 루트 폴더 (root/project)에서 var/www/html/project 디렉토리로 이동하고 기사에서 설명한 것과 동일한 과정을 통해 앱을 작동시킬 수있었습니다!