Submitted by moimichel on Fri, 07/07/2017 - 12:27
In my system Settings/Server Templates I have created a new template with the following extra to apache:
<Directory ${HOME}/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
allow from all
# Disable htaccess starting at web root (Should be by default set to None)
AllowOverride None
</Directory>
When I create a virtual server with this template, those options are added automaticaly by virtualmin to the directive and htaccess file is read by apache:
AllowOverride None Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
How can I disable the use .htaccess in apache2?
Thanks in advance.
Michel.
Status:
Active
Comments
Submitted by JamieCameron on Sat, 07/08/2017 - 12:04 Comment #1
Doesn't
AllowOverride None Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
result in no.htaccess
directives being used? TheOptions=
part should effectively do nothing.Submitted by moimichel on Sun, 07/09/2017 - 10:54 Comment #2
Hi. Scenario I have created:
ServerName ${DOM}
ServerAlias www.${DOM}
DocumentRoot ${HOME}/public_html
ErrorLog /var/log/virtualmin/${DOM}_error_log
CustomLog /var/log/virtualmin/${DOM}_access_log combined
ScriptAlias /cgi-bin/ ${HOME}/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory ${HOME}/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
allow from all
AllowOverride None
</Directory>
<Directory ${HOME}/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
SuexecUserGroup "#1013" "#1013"
ServerName dr7.auxe.net
ServerAlias www.dr7.auxe.net
ServerAlias webmail.dr7.auxe.net
ServerAlias admin.dr7.auxe.net
DocumentRoot /home/dr7/public_html
ErrorLog /var/log/virtualmin/dr7.auxe.net_error_log
CustomLog /var/log/virtualmin/dr7.auxe.net_access_log combined
ScriptAlias /cgi-bin/ /home/dr7/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/dr7/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride None Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php .php
AddHandler fcgid-script .php
AddHandler fcgid-script .php5.6
AddHandler fcgid-script .php7.0
AddHandler fcgid-script .php7.1
FCGIWrapper /home/dr7/fcgi-bin/php7.1.fcgi .php
FCGIWrapper /home/dr7/fcgi-bin/php5.6.fcgi .php5.6
FCGIWrapper /home/dr7/fcgi-bin/php7.0.fcgi .php7.0
FCGIWrapper /home/dr7/fcgi-bin/php7.1.fcgi .php7.1
</Directory>
<Directory /home/dr7/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.dr7.auxe.net
RewriteRule ^(.*) https://dr7.auxe.net:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.dr7.auxe.net
RewriteRule ^(.*) https://dr7.auxe.net:10000/ [R]
RemoveHandler .php
RemoveHandler .php5.6
RemoveHandler .php7.0
RemoveHandler .php7.1
php_admin_value engine Off
FcgidMaxRequestLen 1073741824
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at [no address given] to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Apache Server at dr7.auxe.net Port 80
So at this point I am asking 2 questions:
Thank you, Michel.
Submitted by JamieCameron on Mon, 07/10/2017 - 01:40 Comment #3
It seems odd to me that Apache would behave in this way - I'd expect that using
None
means that nothing is allowed in the.htaccess
file, regardless of which specific Option types are allowed.Submitted by moimichel on Mon, 07/10/2017 - 03:18 Comment #4
What do you suggest me to do to resolve this matter?