0

I followed this tutorial to install mautic on my Digital Ocean droplet.

When i access the domain with www, eg: www.loudmonitor.ga the mautic opens. but when i access loudmonitor.ga, the apache page opens.

What i made wrong and how can i fix this?

PS: I used 'lets encrypt' to configure SSL on www.loudmonitor.ga

sudo nano /etc/apache2/sites-available/mautic.conf

<VirtualHost *:80>
     ServerAdmin eduardofreitas@agencialoud.com
     ServerName loudmonitor.ga
     ServerAlias www.loudmonitor.ga

     DocumentRoot /var/www/html/mautic

     <Directory /var/www/html/mautic/>
        Options +FollowSymlinks
        AllowOverride All
        Require all granted
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined

RewriteEngine on
RewriteCond %{SERVER_NAME} =www.loudmonitor.ga [OR]
RewriteCond %{SERVER_NAME} =loudmonitor.ga
RewriteRule ^ https://www.loudmonitor.ga [END,NE,R=permanent]
</VirtualHost>
Eduardorph
  • 153
  • 10
  • Possible duplicate of [apache redirect from non www to www](https://stackoverflow.com/questions/1100343/apache-redirect-from-non-www-to-www) - at the very least, that answer covers what you probably want to do instead, rather than how to "fix" what you already have. – Mike 'Pomax' Kamermans May 22 '18 at 20:51
  • Hi, i believe that is not a duplication because i have another question. There's no two ways to access the same content. My question is about two DIFFERENTS contents when has www and whithout www – Eduardorph May 22 '18 at 20:55
  • Right, so as per that linked answer: don't use mod_rewrite, declare two two virtualhost sections, one for each (just don't add the redirect that that answer talks about) – Mike 'Pomax' Kamermans May 22 '18 at 22:03

0 Answers0