CMSms's handling of internal ips for servers

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
roastedmnm

CMSms's handling of internal ips for servers

Post by roastedmnm »

I've run up against a wall. Basically I have a server on my LAN that I have been using for testing purposes. The problem is that if I give out my IP address to someone out side of the network for external imput, they can see the page I link to i.e. 65.00.00.100 (port forwarding is all set up) but when they click any link created by CMSMS, the link points to 10.00.00.100 . Even the css fails to load because CMSMS thinks that it is at the address of of the css is at 10.00.00.100/whatever

Any suggestions?

roasted
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: CMSms's handling of internal ips for servers

Post by Ted »

This isn't CMSMS or even PHP.  This is an Apache configuration problem.  If not using a hostname, Apache will always give out the IP of the machine (obviously, the machine's IP behind the firewall).  You can force a hostname by setting the ServerName variable in your httpd.conf file, which is (I think) commented out by default.  In the case of external vs internal IPs, you really need to be using a common hostname for your site.

If you're on a home network, then setup something like http://dyndns.org to have a hostname to point to your network.  Set the ServerName to that same hostname and you should be all set.
roastedmnm

Re: CMSms's handling of internal ips for servers

Post by roastedmnm »

I have to resurrect this thread so I can simply yell. MR. BENEVOLENT DICTATOR OF CMSmadesimple! I love your dedication and your cms. BUT WHY OH PLEASE TELL ME WHY did you give me this response.

Granted I know now more about Apache than I ever wanted to know, but if you had simply said, "look in config.php dummy" I would not have gone on my strange trek through ServerName UseCannonical mod_rewrite GAH :)

Ok, I'm done. I changed:
$config['root_url'] = '10.0.0.100';
to
$config['root_url'] = 'mydomainname.com';


Anyway, I love CMSMS, I really do.

Thank you wishy for your dedication (and a thanks to all the other wonderful folks that answer the questions of stupid fools like me :) )

roasted
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: CMSms's handling of internal ips for servers

Post by Ted »

LOL.  With some math, you'll see that I posted that at 6.07 am.  :)

Anyhoo, sorry about that.  I assumed that you were doing internal and external stuff at the same time.  Sometimes I think a little too deep into it and forget about the simple stuff.

Enjoy!
Locked

Return to “CMSMS Core”