1

I have ubuntu 16.04, I have setup virtual host in apache2 mysite.dev in file /etc/apache2/sites-available/mysite.conf

<VirtualHost *:80>
     ServerName      mysite.dev
     ServerAlias     *.mysite.dev
     DocumentRoot /var/www/mysite

     <Directory /var/www/mysite>

              Options FollowSymLinks

              AllowOverride All
     </Directory>

     ErrorLog /var/log/apache2/error.log

     # Possible values include: debug, info, notice, warn, error, crit,
     # alert, emerg.
     LogLevel warn

     CustomLog /var/log/apache2/access.log combined
</VirtualHost>

it was working fine and I was able to access my site in both firefox and chrome browsers in the link http://mysite.dev/ till yesterday but then I had ran following upgrade commands yesterday

sudo apt-get upgrade

and after restart it start redirecting my application to https i.e. https://mysite.dev/ and showing

ERR_CONNECTION_REFUSED

for obvious reasons

Please Note: I dont want the fix of ERR_CONNECTION_REFUSED instead I want my site to start working at http and stop redirecting it to https in browsers,

I have following versions

  • Ubuntu 16.04.4 LTS
  • Apache/2.4.29 (Ubuntu), Built 2017-10-22T13:35:47

Also note that I'm running PHP 7.0 Magento 2.2 and not intended to change the Virtual Host Domain from mysite.dev

Update: Following is the response to curl -v http://mysite.dev -o saved

* Rebuilt URL to: http://mysite.dev/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 127.0.0.1...
* Connected to mysite.dev (127.0.0.1) port 80 (#0)
> GET / HTTP/1.1
> Host: mysite.dev
> User-Agent: curl/7.47.0
> Accept: */*
> 
  0     0    0     0    0     0      0      0 --:--:--  0:00:30 --:--:--     0< HTTP/1.1 200 OK
< Date: Fri, 06 Apr 2018 09:03:36 GMT
< Server: Apache/2.4.29 (Ubuntu)
< Set-Cookie: store=english; expires=Sat, 06-Apr-2019 09:03:42 GMT; Max-Age=31536000; path=/; domain=mysite.dev; HttpOnly
< Set-Cookie: PHPSESSID=gbvs8fq6q9g67t9jd0bjl71ad4; expires=Fri, 06-Apr-2018 10:03:43 GMT; Max-Age=3600; path=/; domain=mysite.dev; HttpOnly
< Expires: Thu, 06 Apr 2017 09:03:44 GMT
< Cache-Control: max-age=0, must-revalidate, no-cache, no-store
< Pragma: no-cache
< X-Magento-Cache-Control: max-age=0, must-revalidate, no-cache, no-store
< X-Magento-Cache-Debug: MISS
< X-Magento-Tags: FPC
< X-Content-Type-Options: nosniff
< X-XSS-Protection: 1; mode=block
< X-Frame-Options: SAMEORIGIN
< Vary: Accept-Encoding
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=UTF-8
< 
{ [15607 bytes data]
100 95593    0 95593    0     0   3065      0 --:--:--  0:00:31 --:--:-- 24219
* Connection #0 to host mysite.dev left intact
Andrew Schulman
  • 8,561
  • 21
  • 31
  • 47
riksof-zeeshan
  • 115
  • 1
  • 7

1 Answers1

8

This problem occur with latest versions of chrome. This (.dev) domain is not available since 2017. Check this link below https://ma.ttias.be/chrome-force-dev-domains-https-via-preloaded-hsts/

Rayyan
  • 96
  • 1
  • ...dude. Nice catch! – Lenniey Apr 06 '18 at 12:46
  • Wow. It's been a while since I setup `.dev` so naturally my head was about to explode when it's suddenly redirecting to https. Good thing I stumbled upon this. – IMB Oct 20 '18 at 11:10