News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Theme Does not Load

Started by kenny1, October 14, 2010, 03:56:36 PM

Previous topic - Next topic

kenny1

Hello,
I setup SMF on a server at home. I can access it over my internal lan no problem. However, when users attempt to access it remotely over the internet there are problems. Their browser will spin for 30+seconds while the page tries to load. It finally loads but its stripped down with no theme. Links do not work either. Funny thing is they can hit the install.php page right away with no issues (I know I'm suppose to delete this but am in testing right now:) Any ideas why the index.php does not load over the internet? Thx

kenny1

Forgot to mention I'm running this on Ubuntu 10.4 server. Thx

Hj Ahmad Rasyid Hj Ismail

Server settings is not actually our support here. May I know how do you set your Ubuntu Server 10.04? Are you using Perfect Server for Ubuntu Server 10.04 with ISPConfig 3 as guided by How To Forge? I got some experience running one if you use that.

kenny1

Its just a basic x64 U10.4 setup with the packaged LAMP installed. It is in a VM but I kicked the resources way up (dual proc, 2GB memory). Again, the loading problem seems to be isolated to the index.php. Thx

Hj Ahmad Rasyid Hj Ismail

I am not sure about ordinary LAMP settings as I've never try it. I only use ISPConfig 3 with Ubuntu 10.04 as it is easier to use and manage.

青山 素子

You probably set SMF up using the local loopback IP (127.0.0.1). When people try to access it remotely, that IP won't work (it will refer to their computer, not your system). Their computer will try to connect to itself and all those connections take a bit to timeout.

You have a few options:


  • Use an external hosting provider instead of trying to run it yourself. If this kind of thing is tripping you up, you might not have the experience to properly run and secure a public website.
  • Get an extra IP from your ISP and set it up to route to your server. You should be able to access via that IP if you have a business-class firewall that allows you to manage routes (possibly via NAT reflection).
  • Set up a DNS name for your server. Configure things so that the public IP is returned when a lookup is done outside, and an internal IP is returned when done inside. If you aren't running your own DNS server you can play with /etc/hosts (%windir%\System32\drivers\etc\hosts on Windows) to bypass DNS lookups.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


kenny1

Thanks for the info. I set it up with an IP on my lan and it is NAT'd through my firewall so external folks can see it. Just seems to be an issue with index.php. Again, external folks have no problem/issues when they navigate to install.php. Thx

青山 素子

That would be the problem. Non-routable IP = not accessible outside that network. Note that install.php doesn't make any calls based on IP, just an image using a relative path.

See my points above for ways to fix your problem.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


kenny1

It is a routeable IP. It is being nat'd through my firewall as I mentioned earlier. I have a domain name that is linked to my external IP. External users can hit the site but it spins for up to 30 seconds at loading. After that it shows the basic web structure without the theme (pics, borders, etc are not visible). Users can fully access the install.php with theme no problem...and it loads for them right away. So, it doesn't really seem to be a network issue. Seems more like a problem accessing the directory that holds the theme bits. All directories/files in my SMF folder are all chmod'd to 777. Thx

Oya


青山 素子

Yes, a link would be very useful at this point. If you're uncomfortable posting it in public, you are welcome to send it in a PM.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Hj Ahmad Rasyid Hj Ismail

I think Motoko is right. You have to create connection between internal and external IP. To know your external IP you can go here: http://www.whatismyip.com/

Most of the time, one with non-fixed or dynamic IP tend to have problems with external connection. What normally advise is to use free services like http://www.no-ip.com/ or http://www.dyndns.com/ etc. You have to register and have account for this services and free one is a little bit tricky to setup. You will then get your dns where you would want to direct your domain name to it. By doing this, you the said service will point it back to your server so that you can properly browse your website url from any browser.

Like I said, it is a little bit tricky and I have no experience your type Ubuntu Server settings except with using ISPConfig 3.

ISPConfig 3 is like cpanel or directadmin etc.. So that is why I am using it with my Ubuntu Server.

青山 素子

If one's connection has a "dynamic" public IP, that usually indicates consumer-level internet with a corresponding TOS. Always check your ISP's TOS to see if they allow servers. Most do not unless you use their "business" service. You may violate the TOS for a while without issues, but if the ISP detects it, you almost always get your connection terminated. Just a warning so you can't say you didn't know.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Hj Ahmad Rasyid Hj Ismail

Yes. Do check the TOS as well. You don't want to break any rules.

kenny1

I have been using dyndns for over a year now with no issues. I host other external services from within my network and have no issues. Folks here keep returning to this network issue. Is there something unique in the SMF structure that would require a fixed ip? Any other website should be able to call all the needed files from its home directory once the initial connection is made. Does SMF operate differently? If not, I seriously doubt its a network issue. I would be interested in hearing other possible causes. Thx much.

青山 素子

Quote from: kenny1 on October 15, 2010, 05:29:26 PM
Is there something unique in the SMF structure that would require a fixed ip?

No, but an RFC 1918 IP won't work because it's not routable over the public internet (unless upstream has badly configured routers, which does happen at times).


Quote from: kenny1 on October 15, 2010, 05:29:26 PM
Any other website should be able to call all the needed files from its home directory once the initial connection is made. Does SMF operate differently?

SMF constructs full URLs for links so as to make sure everything runs under a canonical domain. Also, it allows for you to use a different URL for themes in the case you get enough traffic to run a different server just for static content.

If your "Forum URL" is configured using a private (non-routable) IP, then your forum will not work when being viewed from outside that network. The solution is either to use a DNS name that resolves to the private IP internally and the public IP externally or to not use one-to-many NAT in front of a server.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Night09

In server settings > database and paths  set your forum url to your external IP address or get a dyndns name as mentioned and enter it there. Also try running repair_settings.php to ensure all the forum links are correct to the folders.

On your router if you havent you will need to set it to send all net traffic to 192.168.1.10 for instance (ususally you can allocate specific services to a set PC, should be under applications and gaming or equiv)and then set that IP on the server,dont let the server allocate the IP for you.If you havent done this it will cause problems,if you have already done the above ignore me. ;)

青山 素子

Quote from: nightbre on October 15, 2010, 08:24:04 PM
On your router if you havent you will need to set it to send all net traffic to 192.168.1.10 for instance (ususally you can allocate specific services to a set PC, should be under applications and gaming or equiv)and then set that IP on the server,dont let the server allocate the IP for you.

Do not set that server's IP as a DMZ machine. You lose the port-blocking that NAT provides.

Do note that the original poster noted others were able to load from outside, so it looks like they did get port forwarding in place.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Aleksi "Lex" Kilpinen

kenny1, any updates? Did you get the theme to load ok? :)
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Zindex

I had just this error after moving the server to another network. The reason is that the site is configured on a internal IP as URL, not the external URL.

To verify this, simple check the source code on the loaded webpage that is corrupt. You will see something like this:

<head>
   <link rel="stylesheet" type="text/css" href="http:// 192.168.1.53/Themes/default/css/index.css?fin20" />
   <link rel="stylesheet" type="text/css" href="http:// 192.168.1.53/Themes/default/css/webkit.css" />
   <script type="text/javascript" src="http:// 192.168.1.53/Themes/default/scripts/script.js?fin20"></script>
   <script type="text/javascript" src="http:// 192.168.1.53/Themes/default/scripts/theme.js?fin20"></script>
   <script type="text/javascript"><!-- // --><![CDATA[


Run the tool found here: http://wiki.simplemachines.org/smf/Repair_settings.php and fix all the defective URL's in 50 seconds. Remember to save, and reboot the server (the cache stores the old data)

Advertisement: