Jump to content

[Answered] Upstream Server Lays Joys Stiff


sehrguey

Recommended Posts

Congratulations!

In a snap or fifty, here is my site!

maht.heliohost.org/rails_apps/blog a.k.a 64.62.211.131:12231

 

Alas!

When trying to open the view, I get answer (page 502) from 64.62.211.131:80 which is apache server at heliohost informing of unidentifiable error from the upstream server (which is also within heliohost system?).

 

That's what I assume browsing my (supposedly) deployed yet not working Rails application - there is some internal server glitch at heliohost.

 

I might be wrong, please, indicate at what point(s).

I'll eagerly learn about server ports and the like matters.

 

yours`

 

sehrguey

Link to comment
Share on other sites

When visiting the link you provided (maht.heliohost.org/rails_apps/blog), I am given a 404 Not Found error. I am curious where you got the port 12231 from on 64.62.211.131:12231. That port isn't open on our servers, which would be why you got the 502 error.

 

Also, I see symlink.php isn't working according to your error_log. Try this code in symlink.php:

<?php
$username = "username";
$appname = "app_name";
$symlink = symlink("/home/" . $username . "/" . $appname . "/public","/home/" . $username . "/public_html/" . $appname);
if (!$symlink)
{
die("Creating link failed. Check your error_log.");
}
else
{
echo "Link created successfully!";
echo readlink("/home/" . $username . "/public_html/" . $appname);
}
?>

Be sure to change username and app_name with your information.

Link to comment
Share on other sites

The info about port :12231 I gathered from my cpanel ror index page, where it runs as follows`

"Current Rewrites

 

http://maht.heliohost.org/rails_apps/blog/ http://maht.heliohost.org:12231/ "

 

What depends on me for the port to be opened on your servers and getting rid of error 502?

 

Thank you for the improved version of the symlink script, I'll sure give it a try.

 

 

Yours`

 

sehrguey

 

Thank you for the improved version of the symlink script, I'll sure give it a try.

 

1) the new symlink file:

<?php
$username = "sehrguey";
$appname = "blog";
$symlink = symlink("/home/" . $username . "/" . $appname . "/public","/home/" . $username . "/public_html/" . $appname);
if (!$symlink)
{
die("Creating link failed. Check your error_log.");
}
else
{
echo "Link created successfully!";
echo readlink("/home/" . $username . "/public_html/" . $appname);
}
?>

 

2) response to using it:

Warning: symlink() [function.symlink]: File exists in /home/sehrguey/public_html/symlink.php on line 4

Creating link failed. Check your error_log.

and

3) quotation from my error_log:

[Thu Dec 20 23:10:55 2012] [error] [client 46.19.96.134] client denied by server configuration: /home/sehrguey/public_html/.htaccess

 

I don't seem to figure out the full meaning of all that.

Could you clarify, please?

 

yours`

 

sehrguey

Link to comment
Share on other sites

Are you sure /home/sehrguey/blog/public exists?
I'm sure it does not.

 

So am I!

There's no /home/sehrguey/blog/public, there is /home/sehrguey/rails_apps/blog/public and if it is the reason for the symlink script failure then I followed the instructions`

Be sure to change username and app_name with your information.[/font][/color]

 

What to do now?

 

yours`

 

sehrguey

Link to comment
Share on other sites

Aha! Sorry, I must have misread something. Okay, that makes a lot of sense now.

<?php
$username = "sehrguey";
$appname = "rails_apps/blog";
$link = "blog";

$symlink = symlink("/home/" . $username . "/" . $appname . "/public","/home/" . $username . "/public_html/" . $link);
if (!$symlink)
{
die("Creating link failed. Check your error_log.");
}
else
{
echo "Link created successfully!";
echo readlink("/home/" . $username . "/public_html/" . $link);
}
?>

Try that. Now visiting maht.heliohost.org/blog will respond with the contents of /home/sehrguey/rails_apps/blog/public. I apologize for my misunderstanding.

Link to comment
Share on other sites

Aha! Sorry, I must have misread something. Okay, that makes a lot of sense now.
 

Try that. Now visiting maht.heliohost.org/blog will respond with the contents of /home/sehrguey/rails_apps/blog/public. I apologize for my misunderstanding.

 

Never mind, we are human.

The updated script though also failed`

Warning: symlink() [function.symlink]: No such file or directory in /home/sehrguey/public_html/symlink.php on line 4

Creating link failed. Check your error_log.

Here is line 4`

$symlink = symlink("/home/" . $username . "/" . $appname . "/public","/home/" . $username . "/public_html/" . $appname);

I suppose it failed because of compound $appname and absence of directory rails_apps in "public_html".

I may be wrong and I'm afraid of screwing things up by adding directory there.

 

shyly yours`

 

sehrguey

Link to comment
Share on other sites

<?php
$username = "sehrguey";
$appname = "rails_apps/blog";
$symlink = symlink("/home/" . $username . "/" . $appname . "/public","/home/" . $username . "/public_html/" . $appname);
if (!$symlink)
{
die("Creating link failed. Check your error_log.");
}
else
{
echo "Link created successfully!";
echo readlink("/home/" . $username . "/public_html/" . $appname);
}
?>

You are correct. I always seem to forget, both the target and link directories must exist before creating a symlink. You will have to create /home/sehrguey/public_html/rails_apps/blog in either FTP or cPanel's file manager, then run the script. Hopefully it works this round!

Link to comment
Share on other sites

There are 2 news:

 

the first is new`

Link created successfully!/home/sehrguey/rails_apps/blog/public

 

the second is old`

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@maht.heliohost.org and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

 

Could it have anything to do with the port issue?

I am curious where you got the port 12231 from on 64.62.211.131:12231. That port isn't open on our servers, which would be why you got the 502 error.

 

Only this time it is error 500.

 

yours`

 

sehrguey

Link to comment
Share on other sites

It should operate fine in port 80. It doesn't look like /home/sehrguey/public_html/rails_apps/blog was created. Create it manually, then run the script. After all this trouble, it may be easier to use the cron method.

 

Do you suggest to delete the application folders at maht.heliohost.org/rails_apps/blog

that were produced by cpanel (usual bunch of Rails folders, you know, for me to fill up with my code)

and create everything anew and manually?

 

I could do that but for fear of breaching the instructions at the cpanel RoR index page.

Do you mean the file_manager_produced folders will be recognized as RoR application even when created in deviation of the eye-candied cpanel RoR index page?

And how will they interact with the underlying framework structures?

 

amazedly yours`

 

sehrguey

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...