Just set "AllowOverride all" to "AllowOverride none". Since you are
the owner and you are configuring the virtualhost it does not make
sense to let .htaccess file override the configuration you are trying
to apply.

El sáb, 28 nov 2020 a las 17:20, Jason Long
(<hack3r...@yahoo.com.invalid>) escribió:
>
> Thank you.
> I asked it on WordPress froum:
> https://wordpress.org/support/topic/how-to-disable-directory-listing-in-wordpress/#post-13719613
>
> They told me: This is 100% a server issue... and that WordPress has nothing 
> to do with it.
> ...
> Also, note that this automatic indexing is provided by the mod_autoindex 
> Apache module. So you can disable this automatic indexing server-wide by 
> simply disabling this model.
>
> Is it OK to disable mod_autoindex?
>
>
>
> Sent from Yahoo Mail on Android
>
> On Tue, Nov 24, 2020 at 6:02 PM, Lucien Gentis
> <lucien.gen...@univ-lorraine.fr> wrote:
> I meant outside any VirtualHost.
>
> You mentionned it in your original message :
>
> Hello,
> I have a WordPress website and my Virtual Host file include below lines:
>
> <Directory "/var/www/WP">
> Options Indexes FollowSymLinks
> AllowOverride all
> Require all granted
> </Directory>
>
> Le 24/11/2020 à 13:46, Jason Long a écrit :
> > Not really.
> > In server global configuration? Is you mean "httpd.conf"?
> >
> >
> >
> >
> >
> >
> > On Monday, November 23, 2020, 08:59:56 PM GMT+3:30, Lucien Gentis 
> > <lucien.gen...@univ-lorraine.fr> wrote:
> >
> >
> >
> >
> >
> > Seems OK for me.
> >
> > Did you try to delete "Indexes" in:
> >
> > <Directory "/var/www/WP">
> > Options Indexes FollowSymLinks
> > AllowOverride all
> > Require all granted
> > </Directory>
> >
> > (which is, I suppose, in server global configuration)
> >
> >
> > Le 23/11/2020 à 12:11, Jason Long a écrit :
> >> Sure.
> >>
> >> <VirtualHost *:80>
> >> Header always set Strict-Transport-Security "max-age=63072000; 
> >> includeSubdomains; preload"
> >> ServerAdmin root@localhost
> >> ServerName www.Example.net
> >> ServerAlias www.Example.net
> >> DocumentRoot /var/www/WP
> >> <Directory "/var/www/WP">
> >> Options -Indexes +FollowSymLinks
> >> AllowOverride all
> >> Require all granted
> >> </Directory>
> >> <Directory /var/www/WP/wp-content/plugins/contact-form-7>
> >>          Options -Indexes
> >> </Directory>
> >> <Directory /var/www/WP/wp-content/plugins/elementor>
> >>          Options -Indexes
> >> </Directory>
> >> <Directory /var/www/WP/wp-content/plugins/elementor-pro>
> >>          Options -Indexes
> >> </Directory>
> >> <Directory /var/www/WP/wp-content/plugins/email-subscribers>
> >>          Options -Indexes
> >> </Directory>
> >> <Directory /var/www/WP/wp-content/plugins/wp-aparat>
> >>          Options -Indexes
> >> </Directory>
> >> ErrorLog /var/log/httpd/wordpress_error.log
> >> CustomLog /var/log/httpd/wordpress_access.log common
> >> RewriteEngine on
> >> RewriteCond %{SERVER_NAME} =Example.net [OR]
> >> RewriteCond %{SERVER_NAME} =www.Example.net [OR]
> >> RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
> >> Redirect permanent / https://www.Example.net
> >>
> >> TraceEnable off
> >> ServerSignature Off
> >>
> >> TimeOut 60
> >>
> >> # Modules
> >> RequestReadTimeout header=20-600,MinRate=500 body=20,MinRate=500
> >> </VirtualHost>
> >>
> >> <VirtualHost *:80>
> >>        ServerName 1.2.3.4
> >>        Redirect 403 /
> >>        ErrorDocument 403 "Sorry, direct IP access not allowed."
> >>        DocumentRoot /dev/null/
> >>        UseCanonicalName Off
> >>        UserDir disabled
> >> </VirtualHost>
> >>
> >>
> >>
> >> Which part is wrong?
> >>
> >>
> >>
> >>
> >>
> >> On Sunday, November 22, 2020, 06:37:27 PM GMT+3:30, Lucien Gentis 
> >> <lucien.gen...@univ-lorraine.fr> wrote:
> >>
> >>
> >>
> >>
> >>
> >> Hello,
> >>
> >> Could you please join your Virtual host complete configuration ?
> >>
> >> Le 22/11/2020 à 14:50, Jason Long a écrit :
> >>> Hello,
> >>> Any idea?
> >>>
> >>> Thanks.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> On Monday, November 16, 2020, 08:11:58 PM GMT+3:30, Jason Long 
> >>> <hack3r...@yahoo.com.invalid> wrote:
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> Hello,
> >>> I have a WordPress website and my Virtual Host file include below lines:
> >>>
> >>> <Directory "/var/www/WP">
> >>> Options Indexes FollowSymLinks
> >>> AllowOverride all
> >>> Require all granted
> >>> </Directory>
> >>>
> >>> Some of my WordPress directories are browsable and when I open the URLs, 
> >>> then the content of the directories displayed:
> >>>
> >>> https://example.net/wp-content/plugins/email-subscribers/
> >>> https://example.net/wp-content/plugins/contact-form-7/
> >>>
> >>> How can I disable the directory indexing for those directories? I added 
> >>> below lines to my Virtual Host config file, but not worked:
> >>>
> >>> <Directory /var/www/WP/wp-content/plugins/email-subscribers>
> >>>            Options -Indexes
> >>> </Directory>
> >>> <Directory /var/www/WP/wp-content/plugins/contact-form-7>
> >>>            Options -Indexes
> >>> </Directory>
> >>>
> >>> Thank you.
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> >>> For additional commands, e-mail: users-h...@httpd.apache.org
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> >>> For additional commands, e-mail: users-h...@httpd.apache.org
>
> >>>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> >> For additional commands, e-mail: users-h...@httpd.apache.org
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> >> For additional commands, e-mail: users-h...@httpd.apache.org
> >>
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> > For additional commands, e-mail: users-h...@httpd.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> > For additional commands, e-mail: users-h...@httpd.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>


-- 
Daniel Ferradal
HTTPD Project
#httpd help at Freenode

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to