You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jason Long <ha...@yahoo.com.INVALID> on 2020/11/16 16:41:38 UTC

[users@httpd] Disable directory indexing for a specific directory.

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-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Disable directory indexing for a specific directory.

Posted by Antony Stone <An...@apache.open.source.it>.
On Sunday 22 November 2020 at 16:06:59, Lucien Gentis wrote:

> Hello,
> 
> Could you please join your Virtual host complete configuration ?

Also, it puzzles me somewhat why you would want *any* directories underneath 
Wordpress to be indexed to viewers.

> > On Monday, November 16, 2020, 08:11:58 PM GMT+3:30, Jason Long wrote:
> > 
> > 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>

Antony.

-- 
I bought a book on memory techniques, but I've forgotten where I put it.

                                                   Please reply to the list;
                                                         please *don't* CC me.

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


Re: [users@httpd] Disable directory indexing for a specific directory.

Posted by Jason Long <ha...@yahoo.com.INVALID>.
Thank you.
It doesn't make any security problem?






On Saturday, November 28, 2020, 08:03:37 PM GMT+3:30, Daniel Ferradal <df...@apache.org> wrote: 





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
(<ha...@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
> <lu...@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 <lu...@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 <lu...@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 <ha...@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-unsubscribe@httpd.apache.org
> >>> For additional commands, e-mail: users-help@httpd.apache.org
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >>> For additional commands, e-mail: users-help@httpd.apache.org
>
> >>>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >> For additional commands, e-mail: users-help@httpd.apache.org
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >> For additional commands, e-mail: users-help@httpd.apache.org
> >>
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


-- 
Daniel Ferradal
HTTPD Project
#httpd help at Freenode


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

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


Re: [users@httpd] Disable directory indexing for a specific directory.

Posted by Daniel Ferradal <df...@apache.org>.
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
(<ha...@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
> <lu...@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 <lu...@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 <lu...@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 <ha...@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-unsubscribe@httpd.apache.org
> >>> For additional commands, e-mail: users-help@httpd.apache.org
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >>> For additional commands, e-mail: users-help@httpd.apache.org
>
> >>>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >> For additional commands, e-mail: users-help@httpd.apache.org
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >> For additional commands, e-mail: users-help@httpd.apache.org
> >>
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


-- 
Daniel Ferradal
HTTPD Project
#httpd help at Freenode

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


Re: [users@httpd] Disable directory indexing for a specific directory.

Posted by Jason Long <ha...@yahoo.com.INVALID>.
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<lu...@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 <lu...@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 <lu...@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 <ha...@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-unsubscribe@httpd.apache.org
>>> For additional commands, e-mail: users-help@httpd.apache.org
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>> For additional commands, e-mail: users-help@httpd.apache.org
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

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

  

Re: [users@httpd] Disable directory indexing for a specific directory.

Posted by Lucien Gentis <lu...@univ-lorraine.fr>.
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 <lu...@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 <lu...@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 <ha...@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-unsubscribe@httpd.apache.org
>>> For additional commands, e-mail: users-help@httpd.apache.org
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>> For additional commands, e-mail: users-help@httpd.apache.org
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

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


Re: [users@httpd] Disable directory indexing for a specific directory.

Posted by Jason Long <ha...@yahoo.com.INVALID>.
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 <lu...@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 <lu...@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 <ha...@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-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org

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

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


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


Re: [users@httpd] Disable directory indexing for a specific directory.

Posted by Lucien Gentis <lu...@univ-lorraine.fr>.
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 <lu...@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 <ha...@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-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

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


Re: [users@httpd] Disable directory indexing for a specific directory.

Posted by Jason Long <ha...@yahoo.com.INVALID>.
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 <lu...@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 <ha...@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-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

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

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


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


Re: [users@httpd] Disable directory indexing for a specific directory.

Posted by Lucien Gentis <lu...@univ-lorraine.fr>.
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 <ha...@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-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

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


Re: [users@httpd] Disable directory indexing for a specific directory.

Posted by Jason Long <ha...@yahoo.com.INVALID>.
Hello,
Any idea?

Thanks.






On Monday, November 16, 2020, 08:11:58 PM GMT+3:30, Jason Long <ha...@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-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

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