sehrguey Posted December 20, 2012 Posted December 20, 2012 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
Ice IT Support Posted December 20, 2012 Posted December 20, 2012 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.
sehrguey Posted December 21, 2012 Author Posted December 21, 2012 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 4Creating link failed. Check your error_log.and3) 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
Ice IT Support Posted December 21, 2012 Posted December 21, 2012 Are you sure /home/sehrguey/blog/public exists?
Krydos Posted December 21, 2012 Posted December 21, 2012 Are you sure /home/sehrguey/blog/public exists?I'm sure it does not.
sehrguey Posted December 22, 2012 Author Posted December 22, 2012 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
Ice IT Support Posted December 22, 2012 Posted December 22, 2012 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.
sehrguey Posted December 24, 2012 Author Posted December 24, 2012 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 4Creating 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
Ice IT Support Posted December 24, 2012 Posted December 24, 2012 <?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!
sehrguey Posted December 25, 2012 Author Posted December 25, 2012 There are 2 news: the first is new`Link created successfully!/home/sehrguey/rails_apps/blog/public the second is old`Internal Server ErrorThe 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
Ice IT Support Posted December 26, 2012 Posted December 26, 2012 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.
sehrguey Posted December 27, 2012 Author Posted December 27, 2012 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/blogthat 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
Ice IT Support Posted December 29, 2012 Posted December 29, 2012 The RoR utilities in cPanel don't work on HelioHost. Go ahead and start over, following the instructions on our wiki (http://wiki.helionet.org/Deploying_a_Rails_application_on_HelioHost).
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now