Hi, I developped a rails application and I wanted to deploy it, I get a dedicated server, and I installed the necessary package: rails, apache2, passenger and I deploy it locally with success and I access it with: http://myapp when I tried to access it from a remote server with tthe url : http://<host name>/myapp I get the error message 404 not found, what am I doing wrong I am able to access it with http://<host name>:3000 when I start the app with "rails s" rgds
on 2014-04-16 08:11
on 2014-04-16 09:51
On 16 April 2014 00:09, Melb01 <firstname.lastname@example.org> wrote: > Hi, > I developped a rails application and I wanted to deploy it, > I get a dedicated server, and I installed the necessary package: rails, > apache2, passenger > and I deploy it locally with success and I access it with: http://myapp > > when I tried to access it from a remote server with tthe url : http://<host > name>/myapp > I get the error message 404 not found, what am I doing wrong There are very many things that could be going wrong so to answer it with such limited data is impossible. The first thing you should do is look in the various logs and see where it is failing. Starting with the apache logs I guess. Colin
on 2014-04-16 12:42
El miércoles, 16 de abril de 2014 01:09:20 UTC+2, Melb01 escribió: > > I am able to access it with http://<host name>:3000 when I start the app > with "rails s" > > rgds > start cheking the firewall and make a ping to host name
on 2014-04-16 20:11
Thank you answering me I open the logs and I found this error: File does not exist: /var/www/myapp How to add it? rgds
on 2014-04-16 20:18
On Apr 16, 2014, at 2:09 PM, Melb01 wrote: > Thank you answering me > I open the logs and I found this error: > File does not exist: /var/www/myapp > > How to add it? > I'm going to take a WAG here, and say that this was boilerplate in the Passenger configuration code that you got when you installed the Passenger application server. Try opening your httpd.conf file, locate that line there, and replace it (two places, in a normal Apache config file) with the actual root-relative path to your application's public folder on the server disk. Or better, tell us which app server and which Web server you are using. Walter
on 2014-04-16 20:41
I found it, but it is an empty file, what line I have to add it?
on 2014-04-16 21:11
On Apr 16, 2014, at 2:39 PM, Melb01 wrote: > I found it, but it is an empty file, what line I have to add it? Then you haven't found the right file. Walter
on 2014-04-16 21:24
it is the file in the directory: /etc/apache2 is there any other directory?
on 2014-04-16 21:34
What server are you using? Ubuntu? Some other Linux? The only thing I can tell you for certain is that it depends... Walter
on 2014-04-16 21:52
I am using ubuntu 10.04
on 2014-04-16 23:18
In the apache2 folder, you should see a pair of folders named sites-available and sites-enabled. Inside sites-available, you will find one or more text files, each of which contains the configuration for a single name-based virtual host. If you see default and default-ssl (or similar) in there, then edit the default file. sites-enabled contains symbolic links to the files in sites-available, which allows you to disable a site without removing its configuration file. If you add more sites to this server, you're going to want to create new config files based on default. Once you do, be sure to add a link to the file (original is in -available, link goes in -enabled). Walter
on 2014-04-16 23:33
I already did that and I myapp file in both directories but I am not able to access the app remotely I used the gem speedy to deploy the app
on 2014-04-16 23:43
I resolved it, I copied the app directory to /var/www and chmod it Is it safe to do like that?
on 2014-04-17 01:41
I deploy my app in a similar manner using virtual hosts on apache2 with passenger. To do this I need to define a hostname with dns though you could do it by putting the hostname in /etc/hosts on both the server and client. That is what I do for local testing. From what you indicate I think you need put the appropriate entries in /etc/hosts and address http://myapp. Norm
on 2014-04-17 08:35
if you are using Passenger, I recommend this post http://hlcfan.logdown.com/posts/139092-deploy-rail... and beside, did you check the difference between local and remote? 在 2014年4月16日星期三UTC+8上午7时09分20秒，Melb01写道：
on 2014-04-21 23:49
Hi, thx for the answer but I am using passenger with apache2 I put myapp to the default site in apache and it worked but when I add a new site and I try to access with http://hostname/myapp I get the error message: The page you were looking for doesn't exist. You may have mistyped the address or the page may have moved. How to solve thios problem, do I need to do something with /etc/hosts?
on 2014-04-21 23:57
I added the ip of the server in my /etc/hosts and it worked, it is great what I have to do, if I want to link myapp to a domainname?