ngrok only shows the localhost
-
When i share a vhost the ngrok url shows the localhost instead of the vhost site.
-
@Rene : Can you show me your ngrok console and your vhost file?
-
-
@Rene : The auto vhost file should contains ngrok entry in ServerAlias.
If you want to modify the file, just remove theauto.
from the filename.
-
-
@leokhoa could you help with the permanent redirect?
-
@Rene : Please check your
.htacess
, you can also type:curl -IL ngrok-url
to debug why it redirects.
-
.htaccess is the wordpress standard one
BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> END WordPress
then i tried
curl -IL ngrok-url
this error appears:
curl: (6) Could not resolve host: ngrok-url
-
@Rene:
ngrok-url
is the url generated by ngrok.By the way, please try these settings in
wp-config.php
:define('WP_SITEURL', $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST']); define('WP_HOME', $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST']);
-
THX not it works!!! Problem solved.
-
@Rene : I'm glad to hear that!
Cheers