• Welcome to Simple Machines Community Forum. Please login or sign up.
December 03, 2021, 05:57:41 PM

News:

SMF 2.1 RC4 has been released! Try it out and help us test! :) Read more.


Activation URL

Started by azaghul33, July 25, 2020, 04:27:11 PM

Previous topic - Next topic

azaghul33

First time user...

Is there a way to set the URL in activation emails?

I'm running SMF 2.0.17 on my home network on a 192.168.x.y address, but need to advertise my public IP with port number (eg: 250.250.250.250:8080) in the email for people to respond to. Running port forwarding.

Under Configuration->Database and Paths->Server Settings I can see Forum URL, which I'd think would do what I want, but cannot get that value to save (eg: 250.250.250.250:8080), it just sticks with the 192.168 address.

I've installed again and added my public IP, without success.
I've edited Settings.php and changed the $boardurl value, without success.
I've added the Email Template Editor, and as a work-around can hard code the public address. ACTIVATIONLINK holds the old URL and the USER u=x variable...which I'm sure there is a separate defined variable for, but don't know the inner workings of SMF.

Had a quick search of the forum, but not knowing exactly what to search for...any assistance appreciated.

Illori

we really dont recommend anyone to run their own server for SMF as it may lead them to be hacked easier.

Gary

^ Clarification: using ones PC as their server is a bad idea. (Except for development purposes)

Owning a dedicated server in a data center is different and fine. (eg. co-locating)
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

azaghul33

Just looking at self hosting as a VM under ESXi, just for a local community residence of maybe 15-20 users...

Gary

Even then it's still not recommended to use your PC in any capacity (even in a VM) for hosting an SMF forum. You're better off using a cheap-ish webhost instead.
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

Arantor

Quote from: azaghul33 on July 25, 2020, 04:27:11 PM
First time user...

Is there a way to set the URL in activation emails?

I'm running SMF 2.0.17 on my home network on a 192.168.x.y address, but need to advertise my public IP with port number (eg: 250.250.250.250:8080) in the email for people to respond to. Running port forwarding.

Under Configuration->Database and Paths->Server Settings I can see Forum URL, which I'd think would do what I want, but cannot get that value to save (eg: 250.250.250.250:8080), it just sticks with the 192.168 address.

I've installed again and added my public IP, without success.
I've edited Settings.php and changed the $boardurl value, without success.
I've added the Email Template Editor, and as a work-around can hard code the public address. ACTIVATIONLINK holds the old URL and the USER u=x variable...which I'm sure there is a separate defined variable for, but don't know the inner workings of SMF.

Had a quick search of the forum, but not knowing exactly what to search for...any assistance appreciated.

Since the users are not on your network anyway, they presumably won't be able to use the 192.x.x.x IP address to visit the forum generally, hence your question.

Just set the URL of the site to the externally facing details (since they'll need that to actually visit anyway) and then activation emails will work.

In any case, hosting this on your own machine is still generally a bad idea unless it's a dedicated machine that isn't shared with anything else you run (e.g. using a a Raspberry Pi)
No good deed goes unpunished
All helpful urges should be circumvented

azaghul33

I appreciate its not the preferred option to self-host, but until I'm certain the board will get used, I'd rather not take the added plunge of external hosting.

It's probably staring me in the face, but where do I set the site URL (IP and port)...preferably without having to reinstall  :) All I can see is the Forum URL in the Server settings.

Arantor

That's where you set it, the server settings themselves. You're setting the master board URL for everything to use the public IP so activations work - no point having activations work if nothing else works!

*YOU* can use your internal IP, you're on your own network, but all the other users won't be, so you will have to use the public facing IP as the URL. I'd honestly suggest forwarding port 80 though you can set that in the URL too.
No good deed goes unpunished
All helpful urges should be circumvented

azaghul33

July 29, 2020, 01:49:21 AM #8 Last Edit: July 29, 2020, 02:38:21 AM by azaghul33
No success unfortunately...

I'm changing the Forum URL to my external IP and port (eg: hxxp:hxxps://100.100.100.100:8082), [nonactive] and saving it, but it keeps reverting to my internal 192.168 IP address of the LAN interface. If I change the IP of the device, the Forum URL will follow it (from 192.168.100.100 to 192.168.100.101)

Arantor

Change it in Settings.php directly.
No good deed goes unpunished
All helpful urges should be circumvented

azaghul33

I'd tried that in the original post...changed the $boardurl value. Yep, I never do anything the easy way :)

Arantor

You then need to access it via the same URL yourself. Exclusively.
No good deed goes unpunished
All helpful urges should be circumvented

azaghul33

That works, just means all admin needs to be done via the public IP, a little more complicated but just a drawback of self hosting.

Thanks for the assist... :) :)

Arantor

I don't know why you think that would give you additional protection, it's all routed through the same code (intentionally, to be able to give some delegated admin powers to non admins)

Almost no PHP app is architected the way you're suggesting, either.
No good deed goes unpunished
All helpful urges should be circumvented

Advertisement: