Answer the question
In order to leave comments, you need to log in
How to set up ssl.conf?
Good day!
Installed an ssl certificate, set it up and it works. BUT gives the listing of the directory, I do not know what to do. .htaccess has no effect at all.
Please tell me what I'm doing wrong. Below conf defoult-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin [email protected]
ServerName domain-name
ServerAlias www.domain-name
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/domain-name.crt
SSLCertificateKeyFile /etc/apache2/domain-name.key
SSLCACertificateFile /etc/apache2/ssl/domain-name.cer
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
</VirtualHost>
</IfModule>
Answer the question
In order to leave comments, you need to log in
.htaccess does not affect because since Apache version 2.3.9 the directive "AllowOverride none"
in the block "<Directory />"
must be put in to make it affect "All"
, you can disable the listing of the directory by "Options -Indexes"
adding it to the same "<Directory />"
. And also look in the campaign directive "DirectoryIndex",
you have one there "index.html"
, then add also"index.php"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question