My problem is slightly different than the posts I have found in searching this topic.
My Drupal server is my localhost, but I have a satatic IP address for it from my ISP.
Drupal 7 is running great on 'localhost' but when an email (e.g. account approval) is received on a remote computer
the link displayed is something like "http://localhost/drupal/user/reset/...........".
I need my satatic IP address to be listed instead of 'localhost'.
Is there an easy way to do this without reinstalling Drupal and specifying it at that time?

Comments

aburrows’s picture

localhost is related to the server's database. On your server you may need to set SMTP

cearlp’s picture

The SMTP on localhost is set to the mail server I'm using, gmail.com. How does this relate to the link sent in an email for a response to creating an account? I'm confused.

jaypan’s picture

I believe this will be determined by the URL you are using to access the site. So if you are accessing the site through 'localhost', that's what will be in the mails. If you access the site by the IP address, that's what will be used in the mails.

Or maybe I'm wrong - not 100% sure on this.

Contact me to contract me for D7 -> D10/11 migrations.
Or anything really. I'm friendly, and open to work or conversation.

cearlp’s picture

Sorry, I tried creating an account from a remote browser and then activated the account from localhost, but the email sent to the remote site still contained 'localhost' in the link.

aburrows’s picture

Maybe have a look in settings.php at

$base_url

I've never come across this issue before, however you can edit the message it sends in user settings.

jaypan’s picture

The key here is that you activated the account from localhost - you would have to activate it from the domain name/IP address.

But that said, I'd look at $base_url in settings.php as aburrows mentioned.

Contact me to contract me for D7 -> D10/11 migrations.
Or anything really. I'm friendly, and open to work or conversation.

cearlp’s picture

The $base_url didn't change things, but invoking Drupal on localhost with the IP address, then signing in as the administartor to activate the new user causes the email to have the IP address in the link instead of 'localhost'.

Thank you all for the help.

yuvaraju.an’s picture

You can get this http://192.168.1.9/drupal/user/reset/... when you make request from the other system rather than the server it works for me.