0

I'm trying to migrate my 16.04 server to 18.04 and I'm running into an issue with one of my wordpress sites. Before I set up letsencrypt I want to be sure the website works via normal http, and one of my sites worked just fine, however the second one forces https no matter what giving me a site cannot be reached error. I compared the two .conf files and the only difference between the 2 are the directories/ServerName, so I'm not sure why it is forcing https on one, but not the other. I've tried deleting the caches in chrome and safari, but both browsers still force https. I've looked in the logs and did not see any errors either. Below you'll find my .conf file. Thanks.

<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 jojo.mydomain.com

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html/jojo
    <Directory /var/www/html/jojo>
        AllowOverride All
    </Directory>
    # 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

3
  • Could your https redirect be in wordpress somewhere?
    – phandolin
    May 23, 2018 at 15:28
  • It could, but I'm not sure where in wordpress. I checked the .htaccess and they were the same on the 2 sites. I tried to comment the rewrite section, which didn't work, then I turned off the rewrite mod for apache and that didn't work either.
    – GRRegis
    May 23, 2018 at 18:13
  • Not Ubuntu related, but in Wordpress, sometimes it can also be in your wp-config.php file, or in the database.
    – phandolin
    May 23, 2018 at 21:44

0

You must log in to answer this question.

Browse other questions tagged .