Hi - I have a RoR installation on debian sarge, serving with Apache2. On the same machine I also have a phpmyadmin serving. I made a entry in the /etc/apache2/sites-available/<appname> and did a2ensite <appname> . Also, I edited /etc/hosts to add <appname> to the localhost line at the end, as per directions I found in the Rails Wiki. These are the symptoms:>From localhost I can get to a controller page withw3m http://<appname>/<controllername> and I see the scaffolded data come up. From the external ip I can do http://<ipaddress>/<appname>/ and I get the welcome to RoR welcome page. So the virtual host setup seems to work in the /etc/apache2/sites-available/<appname> file. However, if I try http://<ipaddress>/<appname>/<controllername> I get a route error. Even though this works for localhost with w3m http://<ipaddress>/<appname>/ from the command line. I have an Alias directive in the virtual host file that reads: Alias /<appname> /var/www/rails/<appname>/public without that alias, I wasn''t getting the RoR welcome page from external before. The phpmyadmin was also broken after adding my rails virtual host entry until I added an alias in /etc/phpmyadmin/apache.conf: Alias /phpmyadmin /var/www/phpmyadmin How do I get the pages that are serving from my rails app to localhost to appear on port 80 from external requests? Anyone else with similar problems? -- Posted via http://www.ruby-forum.com/.
Am Dienstag, den 13.12.2005, 07:24 +0100 schrieb Michae;:> > Hi - > > I have a RoR installation on debian sarge, serving with Apache2. On the > same machine I also have a phpmyadmin serving. I made a entry in the > /etc/apache2/sites-available/<appname> and did a2ensite <appname> . > Also, I edited /etc/hosts to add <appname> to the localhost line at the > end, as per directions I found in the Rails Wiki. > > These are the symptoms: > > >From localhost I can get to a controller page with > > w3m http://<appname>/<controllername> > > and I see the scaffolded data come up. From the external ip I can do > > http://<ipaddress>/<appname>/ > > and I get the welcome to RoR welcome page. So the virtual host setup > seems to work in the > > /etc/apache2/sites-available/<appname> > > file. However, if I try > > http://<ipaddress>/<appname>/<controllername> > > I get a route error. Even though this works for localhost with w3m > http://<ipaddress>/<appname>/ from the command line. > > I have an Alias directive in the virtual host file that reads: > > Alias /<appname> /var/www/rails/<appname>/public > > without that alias, I wasn''t getting the RoR welcome page from external > before. > > The phpmyadmin was also broken after adding my rails virtual host entry > until I added an alias in /etc/phpmyadmin/apache.conf: > > Alias /phpmyadmin /var/www/phpmyadmin > > How do I get the pages that are serving from my rails app to localhost > to appear on port 80 from external requests? Anyone else with similar > problems?You have to specify the host entry for the IP of your server on every computer you want to access the rails application or point a DNS entry to your server. The aliases you defined are for the default Apache VHost. This is why you get the welcome page or PHPMyAdmin under http://<ipaddress>/<alias>.
Norman Timmler wrote:> Am Dienstag, den 13.12.2005, 07:24 +0100 schrieb Michae;: >> >> >> >> How do I get the pages that are serving from my rails app to localhost >> to appear on port 80 from external requests? Anyone else with similar >> problems? > > You have to specify the host entry for the IP of your server on every > computer you want to access the rails application or point a DNS entry > to your server. > > The aliases you defined are for the default Apache VHost. This is why > you get the welcome page or PHPMyAdmin under http://<ipaddress>/<alias>.But, if this was the case, would i be able to reach the public/index.html page from outside? I can do this, but get a routing error if I try to get to the railsapp. Thanks for the help . . . -- Posted via http://www.ruby-forum.com/.