allow directory browsing in the apache2.conf file - not working

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I am trying to allow directory browsing in the apache2.conf file, but when restarting the server, I get an error. This error make the web server crash and I can't get access to the localhost directory. So I have to remove this line of code again, to make server available. How can I allow directory browsing to a specific folder in my web server? Is it possible to allow directory access from the apache2.conf file?



Here is a clip from my code in Ubuntu:



enter image description here










share|improve this question



























    up vote
    0
    down vote

    favorite












    I am trying to allow directory browsing in the apache2.conf file, but when restarting the server, I get an error. This error make the web server crash and I can't get access to the localhost directory. So I have to remove this line of code again, to make server available. How can I allow directory browsing to a specific folder in my web server? Is it possible to allow directory access from the apache2.conf file?



    Here is a clip from my code in Ubuntu:



    enter image description here










    share|improve this question

























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I am trying to allow directory browsing in the apache2.conf file, but when restarting the server, I get an error. This error make the web server crash and I can't get access to the localhost directory. So I have to remove this line of code again, to make server available. How can I allow directory browsing to a specific folder in my web server? Is it possible to allow directory access from the apache2.conf file?



      Here is a clip from my code in Ubuntu:



      enter image description here










      share|improve this question















      I am trying to allow directory browsing in the apache2.conf file, but when restarting the server, I get an error. This error make the web server crash and I can't get access to the localhost directory. So I have to remove this line of code again, to make server available. How can I allow directory browsing to a specific folder in my web server? Is it possible to allow directory access from the apache2.conf file?



      Here is a clip from my code in Ubuntu:



      enter image description here







      server apache2






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 16 at 14:05









      pa4080

      12.3k52357




      12.3k52357










      asked Feb 16 at 12:24







      user794322



























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          First of all there is a typo in your code. AllowOvveride should be AllowOverride.



          Here are few other tips:



          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>





          share|improve this answer






















          • Thanks for the help. I tried it, but i get an error saying "You don't have permission to access / on this server. Server unable to read htaccess file, denying access to be safe". What could be the reason for this error, do i need to change the .htaccess file?
            – user794322
            Feb 16 at 15:19










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1006774%2fallow-directory-browsing-in-the-apache2-conf-file-not-working%23new-answer', 'question_page');

          );

          Post as a guest





























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote



          accepted










          First of all there is a typo in your code. AllowOvveride should be AllowOverride.



          Here are few other tips:



          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>





          share|improve this answer






















          • Thanks for the help. I tried it, but i get an error saying "You don't have permission to access / on this server. Server unable to read htaccess file, denying access to be safe". What could be the reason for this error, do i need to change the .htaccess file?
            – user794322
            Feb 16 at 15:19














          up vote
          0
          down vote



          accepted










          First of all there is a typo in your code. AllowOvveride should be AllowOverride.



          Here are few other tips:



          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>





          share|improve this answer






















          • Thanks for the help. I tried it, but i get an error saying "You don't have permission to access / on this server. Server unable to read htaccess file, denying access to be safe". What could be the reason for this error, do i need to change the .htaccess file?
            – user794322
            Feb 16 at 15:19












          up vote
          0
          down vote



          accepted







          up vote
          0
          down vote



          accepted






          First of all there is a typo in your code. AllowOvveride should be AllowOverride.



          Here are few other tips:



          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>





          share|improve this answer














          First of all there is a typo in your code. AllowOvveride should be AllowOverride.



          Here are few other tips:



          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>






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Feb 16 at 14:27

























          answered Feb 16 at 14:09









          pa4080

          12.3k52357




          12.3k52357











          • Thanks for the help. I tried it, but i get an error saying "You don't have permission to access / on this server. Server unable to read htaccess file, denying access to be safe". What could be the reason for this error, do i need to change the .htaccess file?
            – user794322
            Feb 16 at 15:19
















          • Thanks for the help. I tried it, but i get an error saying "You don't have permission to access / on this server. Server unable to read htaccess file, denying access to be safe". What could be the reason for this error, do i need to change the .htaccess file?
            – user794322
            Feb 16 at 15:19















          Thanks for the help. I tried it, but i get an error saying "You don't have permission to access / on this server. Server unable to read htaccess file, denying access to be safe". What could be the reason for this error, do i need to change the .htaccess file?
          – user794322
          Feb 16 at 15:19




          Thanks for the help. I tried it, but i get an error saying "You don't have permission to access / on this server. Server unable to read htaccess file, denying access to be safe". What could be the reason for this error, do i need to change the .htaccess file?
          – user794322
          Feb 16 at 15:19

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1006774%2fallow-directory-browsing-in-the-apache2-conf-file-not-working%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          pylint3 and pip3 broken

          Missing snmpget and snmpwalk

          How to enroll fingerprints to Ubuntu 17.10 with VFS491