Ngrok issue - Wordpress
Ngrok not working!
It's a wordpress instalation with SSL.
I've installed Really Simple SSL and Relative URL plugins.
I've set these in wp-config.php:
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']);
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);
and also tried
define('WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST']);
define('WP_HOME', 'https://' . $_SERVER['HTTP_HOST']);
I've run with VPS in opera and I'm getting this:
Hi @anjoalre , I'm not sure if it's my ad blocker or what, but I just see the text "0_1533832129467_upload-34e40d1c-9590-44e4-b0c1-59fc01a076cf" under your post. Is there another way you can show the issue you are having with ngrok?
here it goes again.
@anjoalre K, thanks, I can see that. This does not be appeared to be related to WordPress. It looks like an issue with what Laragon is serving up for https://casasemmovimento.dev.test . I'm not saying the issue, per se, is with Laragon source, just that for some reason https://casasemmovimento.dev.test is serving the default Laragon page. It could be a bug in Laragon, could be related to a user configuration. Have you upgraded recently?
If you type https://casasemmovimento.dev.test on your local machine, (so skipping ngrok for the moment), What do you see? Is it the same Laragon default page?
What does your 'sites-enabled' apache conf look like for this site?
when i load directly i see the website normally.
My .conf file was generated automatically and his like this:
define ROOT "D:/laragon/www/casasemmovimento.dev/"
define SITE "casasemmovimento.dev.test"
Require all granted
Require all granted
SSLEngine on SSLCertificateFile D:/laragon/etc/ssl/laragon.crt SSLCertificateKeyFile D:/laragon/etc/ssl/laragon.key
K, So it doesn't look like you're doing anything wrong. I did the same thing and got the same result. I tried a number of different use cases and I found a consistency with long urls, like casasemmovimento.dev. I tried some of the same length and some with less. The longer urls all had the same issue. So I don't know if this is an Ngrok issue or a Laragon issue. You may want to kick this up to @leokhoa to see if they know anything about it. However, if you don't mind, you can always try a shorter url.
I should also note, it has nothing to do with the content of the site. Could be WordPress, blank, whatever.
Instead of having the site be "casasemmovimento.dev.test", you should probably have the site just be "casasemmovimento.test". I also ran into trouble when I tried having a site's URL be ".dev.test".
To do that, when you create your site using Laragon's Quick App, just make the site's name be "casasemmoviment". Then it will configure it all correctly to work on "casasemmovimento.test". I think you'll also then find ngrok will work better too (following the other tips for using ngrok and laragon).
@mnelson4 , that was it!
I can now use ngrok with issues, thanks!
Just one small issue.
With the https url all the css gets "lost" because it's still being served over http.
I resolved it with the following line in wp-config.php
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') $_SERVER['HTTPS']='on';
before the following line
require_once(ABSPATH . 'wp-settings.php');