mod_rewrite가 로드되었지만 phpbb URL 다시 쓰기 옵션이 작동하지 않습니다.

mod_rewrite가 로드되었지만 phpbb URL 다시 쓰기 옵션이 작동하지 않습니다.

mod_rewrite PHP 모듈이 로드되었지만 phpbb URL 재작성 옵션이 작동하지 않습니다.

Software Versions:
- Ubuntu 16.04.3 LTS
- Apache 2.4.18
- PHP 7.0
- Loaded Modules: Virtual Server    Yes
Server Root /etc/apache2
Loaded Modules

    core mod_so 
    mod_watchdog 
    http_core 
    mod_log_config 
    mod_logio 
    mod_version 
    mod_unixd 
    mod_access_compat 
    mod_alias 
    mod_auth_basic 
    mod_authn_core 
    mod_authn_file 
    mod_authz_core 
    mod_authz_host 
    mod_authz_user 
    mod_autoindex 
    mod_deflate 
    mod_dir 
    mod_env 
    mod_filter 
    mod_mime 
    prefork 
    mod_negotiation 
    mod_php7 
    mod_rewrite 
    mod_security2 
    mod_setenvif 
    mod_socache_shmcb 
    mod_ssl 
    mod_status 
    mod_unique_id 
    mod_xml2enc

000-default.conf

<IfModule mod_ssl.c>
    <VirtualHost *:443>
        ServerName www.example.net
        ServerAlias example.net
        Redirect /* https://www.example.net/$1

        SSLEngine on
        SSLCertificateFile /etc/apache2/ssl/certificate.crt
        SSLCertificateKeyFile /etc/apache2/ssl/private.key

        ServerAdmin [email protected]

        DocumentRoot /var/www/html

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined         
    </VirtualHost>
</IfModule>

<IfModule security2_module.c>
    SecRuleEngine on
    ServerTokens Full
    SecServerSignature "MyCustomServer/1.12"
</IfModule>

더 많은 정보가 필요하면 요청하세요. ps. 저는 우분투를 처음 접했어요

답변1

구성 파일을 수정하고 지시문 바로 뒤에 다음 줄을 추가하세요 DocumentRoot. 그런 다음 Apache를 다시 시작하십시오.

DocumentRoot /var/www/html
<Directory /var/www/html>
    Options None FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

지시어는 AllowOverride All이 디렉토리에 대해 .htaccess 파일에 의한 모든 재정의를 허용해야 합니다. 기본적으로는 다음과 같습니다 AllowOverride None.

추가 자료:

관련 정보