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:///myapp
I get the error message 404 not found, what am I doing wrong
I am able to access it with http://:3000 when I start the
app
with “rails s”
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:///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.
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.
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).
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.
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?
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.