View Full Version : Host server at different domain
Mark Brookes
07-28-2006, 07:33 AM
Hi
I think this is a peculiar question but I would really appreciate help.
I am installing eSyndicat on a host server which provides database services, but I want the links directory to be for a different domain hosted by a different host which does not provide database services (at least they want £120 pa.a for it)
I know the right thing to do is move my main site to the better host, but I have spent years getting it to work properly and am reluctant to move.
I believe it is some eSyndiCat settings which use .htaccess & mod_rewrite to build the url in the visitors browser-address-bar.
Is it possible to get the browser to report the domain I want it to, even though the scripts are hosted at a different domain?
How would I do it?
Would this be 'invisible' to search engines? or would they not like it?
I want it to look as though my links directory is a simple part of my main domain.
Please help, I am really reluctant to have to move hosts on my main site.
regards
MArk
If I understand this correctly all you need is to enter correct url for database host.
Instead of localhost it will be something like: database.databasehost.net
This is exactly how 1and1 has it - they have databases on different server
Vincent Wright
07-28-2006, 07:43 AM
This is exactly what occured to my mind too.
A minor addition: in the database server you will have to adjust privileges to allow incoming connection for the server your eSyndiCat script is located on. AFAIK, by default MySQL allows connections only for localhosts, thus you will have to grant permissions to the server you are going to connect from.
Mark Brookes
07-28-2006, 08:23 AM
Wow,
WTM & Vincent
Wow
What service! :good::good::good:
Question posted 8:33
Replies available 8:43
I was lazy & didn't return to read them till 8:57 :)
Thank you for your knowledge & sharing it!
This is very encouraging news ... which I will experiment with
Regards
Mark
Vincent Wright
07-28-2006, 08:27 AM
Sometimes we do experience problems with the forum due to our work load. But we have been trying our best to make it as rare an occasion as possible.
Mark Brookes
07-28-2006, 09:53 AM
Sometimes we do experience problems with the forum due to our work load. But we have been trying our best to make it as rare an occasion as possible.
???
Did I say something wrong?
I was genuinely delighted with the near-instant responses.
for which - Thank you
Reagrds
Mark
Vincent Wright
07-28-2006, 09:58 AM
No, we really appreciate the warm words ppl say about our forum. I just wanted to say that sometimes people did experience some [short] periods when we were unable to answer that fast due to our work load.
Mark Brookes
07-31-2006, 04:14 PM
Hello Vincent
After your earlier help, I was confident that when I was ready I could test a new install - well they say that pride goeth before a fall. So it seems does confidence :)
Today I have tried and tried to set up a Finespeeches links directory and have returned for more help - please.
After various different installation attempts I think:
* I need to install the eSyndiCat programs at www.finespeeches.com (http://www.finespeeches.com)
* At sparklingspeeches.com I need to use
***** cPanel >
***** My SQL dqatabases
***** create new database (my choice not to add to existing tables)
***** create new user name & password
***** attach new user to new database, with ALL privileges
and allow external access to database
***** in a section called "Access Hosts" create an entry so that finespeeches.com can access this new database at the host for sparklingspeeches.
and then
***** during the eSyndiCat installation process - tell the Database Configuration > database server hostname, that it is not "localhost" but actually the sparklingspeeches host.
Is this the correct procedure?
Assuming it is - these are the bits I am stuck on:
[1]
at sparklingspeeches host
allow external access to database
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I have added www.finespeeches.com (http://www.finespeeches.com)
But is this the right format?
Does this mean my finespeeches domain name, or some more arcane definition of the host server where www.finespeeches.com (http://www.finespeeches.com) is hosted?
[2]
at finespeeches/wedding-resources/install//index.php
Database configuration
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Database Server Hostname / DSN
WTM's reply above said ... If I understand this correctly all you need is to enter correct url for database host.
Instead of localhost it will be something like: database.databasehost.net
I dont know how to find the value for this field. I think it is the way that I tell eSyndiCat at finespeeches-the-website, where to find the database at sparklingspeeches-the-host
in cPanel > MySQL
there was a 'connection string' displayed which sounds promising ...
Perl $dbh = DBI->connect("DBI:mysql:spa10001_FSlinks:localhost","xxxusernamexxx","<PASSWORD HERE>");
but does this tell me enough to work out the 'url for database host'?
I have experimented with a number of alternatives, but repeatedly get an error message similar to ...
Executing SQL structure...
Warning: mysql_connect(): Unknown MySQL server host 'DBI' (1) in /....../finespeeches.com/public/www/wedding-resources/install/index.php on line 268
Could not connect to MySQL server: Unknown MySQL server host 'DBI' (1)
Writing config file... OK
Now please completely remove 'install' directory and click Continue.
Is there a proper way to find the value for this field?
any help much appreciated
Regards
MArk
Vincent Wright
07-31-2006, 04:33 PM
Greetings Mark,
as far as I remember CPanel lists two examples of how to connect to the database: one for Perl and one for PHP. Unfortunately, you used the one for Perl while eSyndiCat is written in PHP.
Well, I think you just have to put "www.sparklingspeeches.com" into database host field (the value is stored in includes/config.inc.php, so probably you want to edit this file and manually type in the value).
I think MySQL uses DNS to resolve the name above to actual IP address. Of course you can add a DNS entry like "database.sparklingspeeches.com" and point it to the same IP address. But I don't really think you need this.
Just set up the proper db hostname and give it a try.
If you still get an error feel free to ask.
Mark Brookes
08-01-2006, 06:15 AM
Greetings Mark,
as far as I remember CPanel lists two examples of how to connect to the database: one for Perl and one for PHP. Unfortunately, you used the one for Perl while eSyndiCat is written in PHP..
oops ;)
Well, I think you just have to put "www.sparklingspeeches.com" into database host field (the value is stored in includes/config.inc.php, so probably you want to edit this file and manually type in the value).
Tried this - it works :good:
Another test install gave me a different error message, and from it I was able to work out that when setting my "external access" in cPanel > MySQL I needed to use an arcane reference to represent my host for finespeeches.com, rather than www.finespeehes.com (http://www.finespeehes.com) which I had tried previously. How fortunate that the error message gave the detail I needed :)
If you still get an error feel free to ask.
Thank you
I have already hit the next snag, but I think I may have seen other posts about it so I'm going to explore.......
Regards
Mark
Another test install gave me a different error message, and from it I was able to work out that when setting my "external access" in cPanel > MySQL I needed to use an arcane reference to represent my host for finespeeches.com, rather than www.finespeehes.com (http://www.finespeehes.com) which I had tried previously. How fortunate that the error message gave the detail I needed :)
Just for feature reference: www.site.com is a subdomain of top level domain site.com...
Mark Brookes
08-02-2006, 09:14 AM
Hello again. :)
I'm making progress.
I have sorted out a couple of problems.
I have imported my categories and my links, and my data for table _links_categories and _flat_structure.:yahoo:
All good so far, But now I hit another problem which I can't solve::(
My categories and Links show up fine in Admin-Browse. BUT they do not show up properly in the links directory. You can see this at
http://www.finespeeches.com/wedding-resources/
or rather
http://www.finespeeches.com/wedding-resources/index.php .
Everything looks fine until you try to view a category, for example
http://www.finespeeches.com/wedding-resources/Hotel's-Wedding-Services/. At this point I get my 404 error page.
I don't know for sure, but I think it may be because there is no page at url = http://www.finespeeches.com/wedding-resources/Hotel's-Wedding-Services/, instead there is something in the eSyndiCat programs which points to the database entries for that category. And because the database domain does not match the program domain it can't "find" the page.
It seems that when I am working within the eSyndiCat program it is clever enough to refer to its configuration and sort this out. But when I am "Browsing the internet" to my links directory I am "outside" of the eSyndiCat program and a simple browser can't cope.
Anyway without more speculation on my part - can anyone help?
pretty please.
regards
mark
Vincent Wright
08-02-2006, 09:24 AM
Sounds like a mod_rewrite issue.
Please check this First Ever Composed Knowledge Base article (http://www.esyndicat.com/support/desk/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=1&nav=0) and tell me if it was useful, in other words if it helped you solve the problem.
Mark Brookes
08-02-2006, 11:04 AM
Hello Vincent
I feel a chump! I had looked at the FAQ etc when first getting the links directory for sparklingspeeches to work, and had mentally tagged it as "I've seen everything I need to from here". So when I tried the Finespeeches site, it did not occur to me to re-check the official resources :ooi:
OK here are the results:
Make sure .htaccess exists - yes
Make sure mod_rewrite is installed - Complex
Make sure mod_rewrite is enabled - Complex!
--- I know that these are installed & working at host for sparklingspeeches because I have checked them on previous occasions. But today when I check there is no section named apache at all! I logged in to both my sparklingspeeches and finespeeches admin panel just to be sure. Now my sparklingspeecehs site is working ok and mod rewrite is working so the apache module must be there, but it is not listed in server info :(
Consider switching to another hosting company - yes, I'm considering it :) but trying to put it off for several.m,any months
The last resort - :yahoo: This works!. I can now drill into the categories etc.
Comments:
1. I know this is flagged the last resort, but when I study the displayed url's they dont seem all that much different, at least in the root up to "?"
2. Did I hear some discussion about creating html pages or url's? if so would this be a solution.
3. At the finespeeches site There remains a problem with some links which do not specify .../index.php as a filename and just end with the "/"
Now years ago I seem to remember something about .htaccess, where I could tell it to treat index.shtml as an index file. If I can find out how I did that (don't still use it) I think that may solve this part of the problem.
>> it look like DirectoryIndex index.html index.shtm index.php
>> might be the answer - I'll give it a try
regards
Mark
Vincent Wright
08-02-2006, 11:09 AM
3. At the finespeeches site There remains a problem with some links which do not specify .../index.php as a filename and just end with the "/"
Give me an example of such link please.
Mark Brookes
08-02-2006, 11:41 AM
Wow Vincent, we are really motoring along today ....
While I have mod_rewrite Disabled:
http://www.finespeeches.com/wedding-resources/public-speaking/
did not work, but I have now changed .htaccess so that index.php counts as an index file. This solved part of the problem where eSyndiCat was specifying a directory such as
http://www.finespeeches.com/wedding-resources/public-speaking/ but there was no "official" index file for my internet browser to recognise and display.
So now when I click the link to see the public-speaking category instead of seeing my 404error page I get to see the category.
UNLESS I have mod_rewrite ENabled, in which case I do see the 404error page.
I believe this remaining problem to be due to configuration difficulties when the database is on sparklklingspeeches host, but the eSyndiCat programs are on finespeeches host.
* I think with your help I have a system that works spread across 2 domains and that it would be practicle to manage my links with it. THANKS
However the issue of search engine unfriendlyness is serious, and if we were able to sort it out that woulf be much better.
With mod_rewrite Disabled the links look like:-
http://www.finespeeches.com/wedding-resources/index.php?category=3
works OK
With mod_rewrite ENabled the links look like:-
http://www.finespeeches.com/wedding-resources/Wedding-Accessories/
error404
regards
Mark
Vincent Wright
08-02-2006, 12:38 PM
Hmm, I'm still sure it is mod_rewrite thing. Is there any way for me to take a look at your files/cpanel?
Mark Brookes
08-02-2006, 03:51 PM
Hmm, I'm still sure it is mod_rewrite thing. Is there any way for me to take a look at your files/cpanel?I'll try to PM the deatils
...So when I tried the Finespeeches site, it did not occur to me to re-check the official resources :ooi:
OK here are the results:
Make sure .htaccess exists - yes
Make sure mod_rewrite is installed - Complex
Make sure mod_rewrite is enabled - Complex!
...
Mark,
You missed one step on your check list:
Compare .htaccess file that exist on the server with one that came with the script.
This is most likely where your problem is (and many other users who fail to do it and have 404 errors after installation)
Almost every host will insert EMPTY .htaccess file in every new folder you create.
Sometimes this file can be corrupted during upload also, especially if you use FrontPage.
This is what you need to do:
1. Compare .htaccess file that you have right now in your directory root to the one from the latest patch and make sure they are exactly the same.
2. If this doesn't fix your problem - insert this line:
RewriteBase /your script directory/ right after "RewriteEngine on" line in the beginning of .htaccess file
where "your script directory" is the name of actual folder where script is installed
For example if your script is installed in the root .htaccess file should start with:
# enable mod_rewrite
RewriteEngine on
RewriteBase /
Vincent Wright
08-03-2006, 03:24 AM
Gosh,
this is the one thing that I missed when composing the Knowledge Base article about Error 404. I should have added the RewriteBase option.
Thanks WTM for recalling this. I will add it today.
Mark Brookes
08-03-2006, 06:27 AM
Hello WTM
.htaccess
The 2 copies were identical
but adding:-
RewriteBase /wedding-resources/ <-- IT WORKED :yahoo:
The directory now displays home & categories pages properly TERRIFIC
.......
Ahem
.......
unfortunately every link out to link partners fails because it is prefixed with http://www.finespeeches.com/wedding-resources
for example
http://www.finespeeches.com/wedding-resources/www.purekauai.com
instead of
http://www.purekauai.com
in category:
http://www.finespeeches.com/wedding-resources/Wedding-Locations-and-Themes/
WTM, Vincent:
Can you advise if this is a "normal" problem or to do with having the programs and database on different hosts?
I have tried searching the forums for "links out", but am uninspired for other keywords.
It seems reasonable to think this must be the last hurdle to configuring the basic installation.
regards
Mark
Sorry Mark,
This is out of my reach. You going to have to wait for Vincens or Simon on this one, but I do remember seeng this exact problem before and it was fixed pretty easy...
Vincent Wright
08-03-2006, 06:55 AM
The mod_rewrite problem is a "normal" one and has nothing to do with databases on different server.
As for invalid partner link URLs -- I have to look for a solution.
Mark Brookes
08-03-2006, 10:10 AM
Hmmm... some more evidence:
The same problem persists when:-
* .htaccess includes "RewriteBase /wedding-resources/"
* .htaccess excludes "RewriteBase /wedding-resources/"
* Admin-panel > configs > general configs > Apache mod_rewrite module is "enabled"
* Admin-panel > configs > general configs > Apache mod_rewrite module is "disabled"
not sure where it leads me though :bum-bum:
Mark Brookes
08-03-2006, 10:13 AM
Sorry Mark,
This is out of my reach. You going to have to wait for Vincens or Simon on this one, but I do remember seeng this exact problem before and it was fixed pretty easy...
No worries, thanks for the help.
I've tried searching, but i'm not finding the right threads :)
Vincent Wright
08-03-2006, 11:20 AM
The links are prefixed because there is <base /> tag in page headers.
You either have to remove <base /> tag (which is not recommended since we are unaware of any consequences), or prepend EACH link in the directory with http:// scheme.
Hope this helps.
Mark Brookes
08-03-2006, 04:55 PM
Oh my giddy aunt ! ! !
[exits left] [checks phpMyAdmin > links table > url field]
goodness gracious - none of my url's start with http://:bue:
When I prepared my data for import I didn't put http:// at the start of each url .... :bue:
[opens excel ... adds 2 columns ... formula to combine "http://" with current url ... copy ... paste special as values ... copy back into proper url field ... delete 2 extra columns ... save ... copy data to text editor ... search & replace tab characters with semi-colon characters ... save ... open phpMyAdmin ... import into links table.]
TA DA ... Links work. :good:
See the wonderful working links directory ... http://www.finespeeches.com/wedding-resources/ ... Actually split over 2 hosts but nobody can tell
WTM, Vincent - many thanks :kiss:
[ Oh my goodnes, did I really say "Oh my giddy aunt"? .. ... .... yes I did! ... how embarrasing ..... ..... thank goodness no body heard - slink off quietly ]
Vincent Wright
08-04-2006, 03:11 AM
You are welcome, Mark. ;)
vBulletin® v3.7.0, Copyright ©2000-2013, Jelsoft Enterprises Ltd.