News:

SMF 2.1.6 has been released! Take it for a spin! Read more.

Main Menu

localhost question

Started by Matthew Blouse, December 18, 2007, 10:37:08 PM

Previous topic - Next topic

Matthew Blouse

Hello,

I have done a search for this and found a couple answers but after following the posts my problems are still there.
Here is a link to a site I'm trying to get hosted, hxxp:alternity.us [nonactive]
the website hosting works and the temp link is under the style tab on the right side, any of the website links go to the forum for testing.

This is about the localhost in the theme paths. My problem is, everything works fine from the localhost but any other pc, even on my same network gets red x's for the theme and very slow load times.

So I search about this and found the posts about repair_settings.php. I run repair_settings.php and it fixes many path errors. Still no change because I must also change my localhost path in theme settings so I replace localhost with my domain and then the forums load red x's for the localhost pc AND all other pc's.

I know the domain is good because if you click the link to the site you get a placeholder template, then go to the style tab and click any of the website links on the "right side" to load the forums. So the website domain is working, I have port 80 forwarded.

I'm using xammp to host the site on an xp box. I have no idea what I'm doing wrong, could someone please take a shot at this?
I just want the forum to work from my localhost AND all other pc's but right now I can only get it to work from the localhost even though the domain and website seem fine.

Sorry for the long post and I will post any screenshots you need or files just tell me what file settings you need or file structure screen shots.

Also there is no important info on the server, could someone please test the security of the website?

Thanks
Matt B.

Rumbaar

Can't access your forum from that site or links on that site, so can't test.

But you need to run the repair_settings.php tool from the external URL.  Then reset all URL's to that external URL.  Then go into your Theme Settings and reset all paths to that external URL.

Check all your absolute paths and URL paths, like attachments and avatars.

With this set all should be able to see the correct details, though at the localhost level you might not have it displaying correctly.  But you might be able to put a redirect in your local machines HOSTS file.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

karlbenson

QuoteXAMPP is not meant for production use but only for developers in a development environment.

Xampp is meant for testing purposes, not to actually run your site on.  It is not fully secure.  It has missing security features that would be required to use it in a real-life context.  So it would be relatively easy for someone to compromise it.

You should also check with your Internet Service Provider (ISP) because it is often against the term and conditions to try to run a home server to the internet. (and they often have measures in place to prevent you doing so).  It could result in extra surcharges or even suspension of your internet account.

Matthew Blouse

#3
Ah, I have been running the repair_settings.php from the local host. So I should connect with the admin password from an external IP, run the repair and set all localhost paths to the actual domain path?
I will do this but can someone explain why running the repair from external ip is different from changing the paths from the local host?

I am on Qwest internet and will check with them about the website hosting and extra charges.

So should I just ditch the xammp install and go with a regular apache, php and sql install?

karlbenson

You definately need to find one which is suitable for running a production website including full security functionality.

Matthew Blouse

#5
Now apache, php and mysql are reinstalled.

I place the forum contents in the htdocs folder just to test.
Now everything shows as an index only, all the folders work.

But when I try to run the install.php it says error 400 Bad Request.
Anyone know what Bad Request means? Sorry I'm so new.

Thanks
MB

*Going through the php apache 2.0 tutorial now on their website.

Not sure if I should install php as CGI or module for apache, they have 2 options.

Ok this is fixed I installed as CGI. Everything works great!

Rumbaar

For the most part 'we' are here for setting up and running SMF software on a working host.  Not really here for support on setting up home based servers.  So you might find that level of support unavailable.

If you are going to go down this path of setting up and operating you own server, you really need a keen understand of Apache, PHP, MySQL, security, TCP/IP, etc.  It might be best you find a host that has all that setup already and install and run SMF on that.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Matthew Blouse

#7
I got the above post fixed the Bad request error was because I failed to add some lines in the config file for php.

Xammp is uninstalled and apache, mysql, php are all installed correctly and working.
The forum loads from the localhost PC correctly and looks great!

Now I want to run the repair_settings.php from an external ip, like my friends pc and replace all instances of "localhost" with the correct domain?

Rumbaar

Well as long as you run it and put in the external URL instead of the suggested localhost, it should be ok to run at that level.  Be sure to check all other paths like theme, avatar and attachment paths afterwards.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Matthew Blouse

#9
Thanks for the help everyone!
I think everything is working.

Here is the link hxxp:alternity.us [nonactive]

Then on the webpage, the first link "blog" goes to the simple machines forums. The second link goes to a phpbb forum.
Can you guys please let me know if the forums load for you?

Looks like I'm not such a noobers after all! Huzzah! Home brew server power, Believe IT!

The only problem is the sm forum still does not work for local machines.
Can someone tell me why I have to edit the host file to get sm forums to work and phpbb forum works external and internal with no configuration needed?

Is it possible to add some of those auto configuration options from the free phpbb install to SM install?
But please dont take that the wrong way, even with all the extra config I'm still going to use sm forums over phpbb.
SM forums install has the ability to create a non-existent database where phpbb install can only connect to an existing one. That is one major plus sm install has over phpbb.

Thanks a lot for the help testing and the info.
MB

P.S If you want to hack my box go for it and please respond with any security holes you can find.

Rumbaar

phpBB links are relative to it's current location, SMF's are absolute.   Also may I ask why do you put them in a frame?
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Matthew Blouse

#11
Ok I understand, I know you guys know what your doing with the forums so I was just asking not complaining about sm. I really like these forums and the software.

I'm sorry, not sure what you mean by frame? Do you mean the forum links being in the upper right links on the first webpage? Or is there some graphics problem with the forums or site?

Sorry I'm pretty new to html

Dragooon

No it doesn't works because the URL to forum is localhost. Fix it.

Matthew Blouse

Dragoon, I just checked again with a proxy and the main forum page loads fine.

Do you mean functions like registration on the forum are still broken, because I have not ran the repair_settings.php, I ONLY fixed the admin themes to test the look.
The main forum page didnt load correctly?

Rumbaar

You need to go into Theme Settings=>Reset Theme URLs and Directories and reset them all to the correct URL address.  They are most likely still set to Localhost there.

When I said frames, when you visit the two forums they are incased in a HTML frame.  Don't know why.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Dragooon

Maybe because the localhost is running on your server.
the URLS for me is like http://localhost/index.php?board=1.0

Matthew Blouse

I bet the frame is coming from the code on the first page. I will check out the code later. I'm about to fall asleep.

I will also work on repairing the localhost paths later I just can't stay up.

Just to be sure the paths all say hxxp:localhost/forum [nonactive]

I change it to hxxp:alternity.us/forum [nonactive] or  do I change it to hxxp:alternity.dynu.com/forum [nonactive]

Dynu is who provides my dynamic dns for the alternity domain.

Rumbaar

Whatever one is the one that will be available to the public, and consistent across your site.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Advertisement: