MAMP PRO document root forbidden when adding ssl - apache

Just upgraded to Mamp Pro 3.5 from simple MAMP and all worked great till I added a self signed cert.
My document root for my local.mysite.com was set to htdocs/html/magento
Site works fine using http.
When I add the self signed ssl the site now only works correctly at https pages. If I try to go to any page without https such as http://local.mysite.com/store I get this in the apache log:
File does not exist: /Applications/MAMP/htdocs/store
If I uncheck the ssl the http urls all work again.
Did I miss something in the set up?
Thanks

It's far from obvious, but you can actually add a second host with the exact same domain name (local.mysite.com in your case) but this time leave SSL disabled on the SSL tab.
You'll therefore have two hosts, both for local.mysite.com. One is for https and the other for http.

Related

How to enable HTTPS/SSL on XAMPP (Windows) using ngrok reverse proxy?

I am using ngrok to make my local instance of Apache (running through XAMPP on Windows 10) viewable to the internet. It works fine to access http://example.com but if I try https://example.com it gives me a certificate error (because the certificate is issued for its ngrok.io domain). I know I can avoid the cert error by using a url that ngrok generates for https, but I'd rather use my own domain name. How can I avoid the certificate error and get my site to load over https? I've seen a few guides for enabling https/ssl on localhost, but that's not what I need to do - I need to enable it for example.com, not localhost, and as I said, serving the site over http is working fine.

MAMP Pro, 403 forbidden unless typing https://

I have recently started switching all my sites to SSL, locally using Mamp Pro virtual hosts and self-sign certificates.
All works fine with one exception:
if I type local.domainname.co.uk in a browser I get a 403 error, unless I type the full https:// first, then it works fine. On the live site it all works as expected; type domainname.co.uk and the browser fills in the https:// for me.
These are drupal sites using htaccess module to force the ssl - but since it works live but not local I'm assuming its a mamp issue?
Solved this - I needed to set up a non-SSL host in MAMP with the same name and settings as the SSL host (with SSL unchecked obviously) - although I want the site all https, there still needs to be an http host so it can re-direct to ssl (until browsers default to https at some point in the future?). MAMP instructions.
Or don't bother if you can live with typing https:// every time!

Contao CMS error with https - 404 error

Morning
I have a domain, www.example.com, which is a Contao 3.1.3 CMS website on Linux Apache.
I have just purchased and installed SSL certificate for the domain.
When I go to https://www.example.com (or https://example.com) all works fine.
when I try one of the other pages on the domain, http://www.example.com/folder/page.html all is fine, but with https://www.example.com/folder/page.html
, I get an error:
The requested URL /folder/page.html was not found on this server.
This does not happen with pages in the admin area, which all appear fine via https
Console log shows:
Failed to load resource: the server responded with a status of 404 (Not Found)
What is the solution to make all pages appear ok under https
I tried this: https://community.contao.org/de/showthread.php?43595-SSL-und-Contao
but it didn't help
I also checked https://www.sslshopper.com/ssl-checker.htm to see if the error is with the ssl certificate, but no problems found there.
Jez D
Problem cannot be on the SSL. From your explanation I would suggest you play around with disabling folder urls and url rewrite in the settings. Then make sure the page exists. I am sure from here you will be able trace down the problem.
Make sure also in the root page, the 'domain' field is on https if its set.
You can restore your folder and url rewrite settings when all is well
The issue was actually with the directives on the virtual server.

PhpMyAdmin slipping <style>html{display:none;}</style> into <head> tag after adding https and cloudflare?

I bought a comodo tls certificate and successfully added it to my website running on Arch Linux and NGINX.
The main homepage displays fine.
The phpMyAdmin directory that was working prior to adding cloudflare and https still displays, and would show everything I assume, except for this pesky bit of html which seems to be being implanted into the tag for some reason:
<style>html{display:none;}</style>
Has anybody else come across this phenomenon before?
PHPMYADMIN + CLOUDFLARE = display none?
It was cloudflare doing something that phpmyadmin didn't like apparantly.
Accessing my direct.domain.com/phpmyadmin link works as domain.com/phpmyadmin used to.
The 'direct' subdomain is a cloudflare-free subdomain by default as specified in the cloudflare DNS settings.

Where to upload files for subdomain over HTTPS in PLESK 10?

This has taken me hours already.
I've a new server with a fresh PLESK 10 installation. Now subdomains are handled differently in PLESK 10, that I know (not domain.tld/subdomains/httpdocs but domain.tld/httpdocs_subdomain for instance).
Now, I got a subdomain working over HTTP perfectly. However, when I change it to https://subdomain.domain.tld it just gives me a Default page.
In older versions, one could select "use one directory for both http and https" but PLESK 10 seems to make no difference anymore. However... Why do I get a Default Page when using https? And more important: How to fix this?
I hope someone can help me out!
Plesk 10 changes the way it manages http and https.
Both http and https point to the same directory now.
When you create a subdomain in Plesk 10, a directory is created in your http root and in the subdomains folder, so say you create a subdomain called "secure", you'll get:
/secure
/subdomains/secure
As for your issue, is SSL enabled for that subdomain?
Within Plesk 10 ensure you have SSL enabled:
Website & Domains
Click on your subdomain
Check Enable SSL Support
Maybe its easy:
Open Plesk
Click on required Domain
Click on File Manager
Click Sub Domain Folder.
Click Add File
Give the path and Click on some buttons.
It does not matter if you are using plesk with https ot http, because even configured over SSL it always fetch the files from httpdocs folder.