PHP가 모든 디렉토리에서 작동하지 않습니다

PHP가 모든 디렉토리에서 작동하지 않습니다

램프 서버를 설치하고 모든 지침에 따라 해당 디렉터리를 Dropbox 폴더로 변경했습니다.여기.

내가 연 첫 번째 페이지는 안에 있었고 http://localhost/askRond/Website/아무런 문제없이 열렸습니다.

index.php하지만 디렉토리 에 생성 하고 파일 안에 PHP 코드를 넣으면 브라우저에서 .../Dropbox열었을 때 아무것도 표시되지 않았습니다 . localhost/페이지의 소스 코드가 완전히 비어 있었습니다.

index.php다른 파일로 옮겼을 때도 test같은 문제가 나타났습니다. 그러나 파일로 옮겼을 때 askRond/Website/파일의 모든 PHP가 성공적으로 실행되었습니다.

apache2 파일 내용

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Require all denied
</Directory>

<Directory /usr/share>
    AllowOverride None
    Require all granted
</Directory>

<Directory /home/nullsky/Dropbox/>
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>

#<Directory /srv/>
#   Options Indexes FollowSymLinks
#   AllowOverride None
#   Require all granted
#</Directory>

설명이 없는 Dropbox.conf 내용(튜토리얼 기반, 000-default.conf 대신 새 .conf 파일을 만들었습니다.

<VirtualHost *:80>

    ServerAdmin webmaster@localhost
    DocumentRoot /home/nullsky/Dropbox

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

</VirtualHost>

인터넷에서 이 문제를 검색했지만 해결책을 찾지 못했습니다.

이 문제를 어떻게 해결할 수 있나요?

관련 정보