2

I am trying to set up a Drupal site on a VPS. It was working. I used certbot to set up https, which worked when going to https://example.com . Going to example.com was in http. I vaguely followed https://linuxize.com/post/redirect-http-to-https-in-apache/ and now it's completely broken. I can access https://example.com but if I go to example.com it redirects to example.com/https://example.comhttps://example.comhttps://example.com(and keeps going)

I unfortunately did not think to make a backup conf file. I've been running sudo systemctl reload httpd between (saved) conf changes.

I am in /etc/httpd/conf.d and currently have drupal.conf to

''' <VirtualHost *:80> ServerName example.com ServerAlias example.com ServerAdmin example.com DocumentRoot /var/www/html/drupal/

 Redirect "/" "https://example.com/"

<Directory /var/www/html/drupal> Options Indexes FollowSymLinks AllowOverride All Require all granted RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] </Directory>

'''

and drupal-le-ssl.conf is set to

'''

<VirtualHost *:443> ServerName example.com ServerAlias example.com ServerAdmin example.com

 DocumentRoot /var/www/html/drupal/

 <Directory /var/www/html/drupal>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
        RewriteEngine on
        RewriteBase /
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</Directory>

SSLCertificateFile /etc/letsencrypt/live/cycrev.com/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/cycrev.com/privkey.pem Include /etc/letsencrypt/options-ssl-apache.conf

'''

Any suggestions on what I should change to remove that? I'm not sure if it would be bad for me to post the actual url. It has no content currently, if you think that would be helpful let me know.

schumi23
  • 21
  • 1

0 Answers0