permite navegar no diretório do arquivo apache2.conf - não funciona

0

Estou tentando permitir a pesquisa de diretório no arquivo apache2.conf , mas ao reiniciar o servidor, recebo um erro. Esse erro faz com que o servidor da web falhe e eu não consigo acessar o diretório localhost. Então eu tenho que remover essa linha de código novamente, para disponibilizar o servidor. Como posso permitir a pesquisa de diretório em uma pasta específica no meu servidor web? É possível permitir o acesso ao diretório do arquivo apache2.conf ?

Aqui está um clipe do meu código no Ubuntu:

    
por pa4080 16.02.2018 / 13:24

1 resposta

0

Primeiro de tudo, há um erro de digitação no seu código. AllowOvveride deve ser AllowOverride .

Aqui estão algumas outras dicas:

Alias /nytest /var/www/nytest                              # this directive will make the directory accessible at http://localgost/nytest in case that your DocumentRoot is not '/var/www/' but '/var/www/html/' as it is by default
<Directory /var/www/nytest>
    Options +Indexes
    IndexOptions FancyIndexing FoldersFirst NameWidth=* DescriptionWidth=* # better appearance
    DirectoryIndex Disabled                                # disable the 'execution' of the index files
    AllowOverride None                                     # disable .htaccess files
    AddType text/plain .html .htm .shtml .php .phtml .php5 # display these file types as plain text
    php_admin_flag engine off                              # don't run arbitrary PHP code; if you've other scripting languages, disable them too.
    Order allow,deny
    Allow from all
    Require all granted
</Directory>
    
por pa4080 16.02.2018 / 15:09