is this the redirect you are talking about?
<Directory /var/www/html/sites/adds>
Options Indexes FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
if I understood correctly I need to remove this and check if the website is still working. is this correct? Or is the redirect somewhere else?
Here is the complete file before and after changes and the a file from a website that ssl is working on my server
conf file from a website with ssl working on the same server
#
# Expires module
#
#ExpiresActive On
#ExpiresByType image/gif "access plus 1 months"
#ExpiresByType image/jpg "access plus 1 months"
#ExpiresByType image/jpeg "access plus 1 months"
#ExpiresByType image/png "access plus 1 months"
#ExpiresByType image/vnd.microsoft.icon "access plus 1 months"
#ExpiresByType image/x-icon "access plus 1 months"
#ExpiresByType image/ico "access plus 1 months"
#ExpiresByType application/javascript "now plus 1 months"
#ExpiresByType application/x-javascript "now plus 1 months"
#ExpiresByType text/javascript "now plus 1 months"
#ExpiresByType text/css "now plus 1 months"
#ExpiresDefault "access plus 1 days"
#
# Deflate
#
#AddOutputFilterByType DEFLATE text/plain
#AddOutputFilterByType DEFLATE text/html
#AddOutputFilterByType DEFLATE text/xml
#AddOutputFilterByType DEFLATE text/css
#AddOutputFilterByType DEFLATE application/xml
#AddOutputFilterByType DEFLATE application/xhtml+xml
#AddOutputFilterByType DEFLATE application/rss+xml
#AddOutputFilterByType DEFLATE application/javascript
#AddOutputFilterByType DEFLATE application/x-javascript
#AddOutputFilterByType DEFLATE application/ecmascript
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
# Don't gzip
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
#Dealing with proxy servers
<IfModule mod_headers.c>
Header append Vary User-Agent
</IfModule>
</IfModule>
#
# ETAG
#
<Directory /var/www/html/weye/public/images/>
FileETag MTime Size
# Set PHP to not use cokkies
SetEnv session.use_cookies='0';
#CacheIgnoreHeaders None
<ifmodule mod_expires.c>
<filesmatch "\.(jpg|gif|png|ico|css|js)$">
ExpiresActive on
ExpiresDefault "access plus 1 months"
Header unset Cookie
Header unset Set-Cookie
RequestHeader unset Cookie
</filesmatch>
</ifmodule>
</Directory>
<Directory /var/www/html/weye/public/scripts/>
FileETag MTime Size
# Set PHP to not use cokkies
SetEnv session.use_cookies='0';
# CacheIgnoreHeaders None
<ifmodule mod_expires.c>
<filesmatch "\.(jpg|gif|png|ico|css|js)$">
ExpiresActive on
ExpiresDefault "access plus 1 months"
Header unset Cookie
Header unset Set-Cookie
RequestHeader unset Cookie
</filesmatch>
</ifmodule>
</Directory>
<Directory /var/www/html/weye/public/cache/>
FileETag MTime Size
# Set PHP to not use cokkies
SetEnv session.use_cookies='0';
# CacheIgnoreHeaders None
<ifmodule mod_expires.c>
<filesmatch "\.(jpg|gif|png|ico|css|js)$">
ExpiresActive on
ExpiresDefault "access plus 1 months"
Header unset Cookie
Header unset Set-Cookie
RequestHeader unset Cookie
</filesmatch>
</ifmodule>
</Directory>
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
ServerName weye.com.br
ServerAlias www.weye.com.br
ServerAdmin noreply@waid.com.br
DocumentRoot /var/www/html/weye/public
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
<Directory /var/www/html/weye/public>
Options Indexes FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
RewriteEngine on
RewriteCond %{SERVER_NAME} =weye.com.br [OR]
RewriteCond %{SERVER_NAME} =www.weye.com.br
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
Unaltered conf file from a similar website on the same server without ssl
#
# Altere as configurações abaixo onde for solicitado, em seguida
#
# Para ativar o site utilize o comando
# sudo a2ensite 00x-weye-nome-do-site.conf
#
# Em seguida altere no projeto o arquivo core.php
# Para indicar a nova URL Base
#
# No htacess da raiz do site, altere o parâmetro a seguir
# RewriteBase /nomedosite
# para
# RewriteBase /
#
# ApĂłs tudo configurado reinicie o apache
# sudo apachectl restart
#
# Colocar nome da pasta do site na variável abaixo
Define site_path /var/www/html/sites/pousadadonarosa
# Colocar domĂnio do site
Define site_domain pousadadonarosa.com.br
###############
# NĂŁo alterar #
###############
<VirtualHost *:80>
# Configurar domĂnio
ServerName ${site_domain}
ServerAlias www.${site_domain}
ServerAlias m.${site_domain}
DocumentRoot ${site_path}
<Directory ${site_path}>
Options Indexes FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
ServerAdmin noreply@waid.com.br
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
# Don't gzip
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
#Dealing with proxy servers
<IfModule mod_headers.c>
Header append Vary User-Agent
</IfModule>
</IfModule>
#
# ETAG
#
<Directory ${site_path}/public/images/>
FileETag MTime Size
# Set PHP to not use cokkies
SetEnv session.use_cookies='0';
#CacheIgnoreHeaders None
<ifmodule mod_expires.c>
<filesmatch "\.(jpg|gif|png|ico|css|js)$">
ExpiresActive on
ExpiresDefault "access plus 1 months"
Header unset Cookie
Header unset Set-Cookie
RequestHeader unset Cookie
</filesmatch>
</ifmodule>
</Directory>
<Directory ${site_path}/public/scripts/>
FileETag MTime Size
# Set PHP to not use cokkies
SetEnv session.use_cookies='0';
# CacheIgnoreHeaders None
<ifmodule mod_expires.c>
<filesmatch "\.(jpg|gif|png|ico|css|js)$">
ExpiresActive on
ExpiresDefault "access plus 1 months"
Header unset Cookie
Header unset Set-Cookie
RequestHeader unset Cookie
</filesmatch>
</ifmodule>
</Directory>
<Directory ${site_path}/public/cache/>
FileETag MTime Size
# Set PHP to not use cokkies
SetEnv session.use_cookies='0';
# CacheIgnoreHeaders None
<ifmodule mod_expires.c>
<filesmatch "\.(jpg|gif|png|ico|css|js)$">
ExpiresActive on
ExpiresDefault "access plus 1 months"
Header unset Cookie
Header unset Set-Cookie
RequestHeader unset Cookie
</filesmatch>
</ifmodule>
</Directory>
<Directory ${site_path}/public/upload/>
FileETag MTime Size
# Set PHP to not use cokkies
SetEnv session.use_cookies='0';
# CacheIgnoreHeaders None
<ifmodule mod_expires.c>
<filesmatch "\.(jpg|gif|png|ico|css|js)$">
ExpiresActive on
ExpiresDefault "access plus 1 months"
Header unset Cookie
Header unset Set-Cookie
RequestHeader unset Cookie
RequestHeader unset Cookie
</filesmatch>
</ifmodule>
</Directory>
altered conf file that is still not working
#
# Altere as configurações abaixo onde for solicitado, em seguida
#
# Para ativar o site utilize o comando
# sudo a2ensite 00x-weye-nome-do-site.conf
#
# Em seguida altere no projeto o arquivo core.php
# Para indicar a nova URL Base
#
# No htacess da raiz do site, altere o parâmetro a seguir
# RewriteBase /nomedosite
# para
# RewriteBase /
#
# ApĂłs tudo configurado reinicie o apache
# sudo apachectl restart
#
# Colocar nome da pasta do site na variável abaixo
Define site_path /var/www/html/sites/adds
# Colocar domĂnio do site
Define site_domain suaempresanasnuvens.com
###############
# NĂŁo alterar #
###############
<VirtualHost *:80>
# Configurar domĂnio
ServerName suaempresanasnuvens.com
ServerAlias www.suaempresanasnuvens.com
ServerAlias m.suaempresanasnuvens.com
DocumentRoot /var/www/html/sites/adds
<Directory /var/www/html/sites/adds>
Options Indexes FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
ServerAdmin noreply@waid.com.br
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Listen 443
<VirtualHost *:443>
ServerName suaempresanasnuvens.com
ServerAlias www.suaempresanasnuvens.com
ServerAlias m.suaempresanasnuvens.com
DocumentRoot /var/www/html/sites/adds
<Directory /var/www/html/sites/adds>
Options Indexes FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
SSLEngine on
SSLCertificateFile "/etc/letsencrypt/live/suaempresanasnuvens.com/fullchain.pem"
SSLCertificateKeyFile "/etc/letsencrypt/live/suaempresanasnuvens.com/privkey.pem"
</VirtualHost>
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
# Don't gzip
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
#Dealing with proxy servers
<IfModule mod_headers.c>
Header append Vary User-Agent
</IfModule>
</IfModule>
#
# ETAG
#
<Directory /var/www/html/sites/adds/public/images/>
FileETag MTime Size
# Set PHP to not use cokkies
SetEnv session.use_cookies='0';
#CacheIgnoreHeaders None
<ifmodule mod_expires.c>
<filesmatch "\.(jpg|gif|png|ico|css|js)$">
ExpiresActive on
ExpiresDefault "access plus 1 months"
Header unset Cookie
Header unset Set-Cookie
RequestHeader unset Cookie
</filesmatch>
</ifmodule>
</Directory>
<Directory /var/www/html/sites/adds/public/scripts/>
FileETag MTime Size
# Set PHP to not use cokkies
SetEnv session.use_cookies='0';
# CacheIgnoreHeaders None
<ifmodule mod_expires.c>
<filesmatch "\.(jpg|gif|png|ico|css|js)$">
ExpiresActive on
ExpiresDefault "access plus 1 months"
Header unset Cookie
Header unset Set-Cookie
RequestHeader unset Cookie
</filesmatch>
</ifmodule>
</Directory>
<Directory /var/www/html/sites/adds/public/cache/>
FileETag MTime Size
# Set PHP to not use cokkies
SetEnv session.use_cookies='0';
# CacheIgnoreHeaders None
<ifmodule mod_expires.c>
<filesmatch "\.(jpg|gif|png|ico|css|js)$">
ExpiresActive on
ExpiresDefault "access plus 1 months"
Header unset Cookie
Header unset Set-Cookie
RequestHeader unset Cookie
</filesmatch>
</ifmodule>
</Directory>
<Directory /var/www/html/sites/adds/public/upload/>
FileETag MTime Size
# Set PHP to not use cokkies
SetEnv session.use_cookies='0';
# CacheIgnoreHeaders None
<ifmodule mod_expires.c>
<filesmatch "\.(jpg|gif|png|ico|css|js)$">
ExpiresActive on
ExpiresDefault "access plus 1 months"
Header unset Cookie
Header unset Set-Cookie
RequestHeader unset Cookie
RequestHeader unset Cookie
</filesmatch>
</ifmodule>
</Directory>