Pages only load with :8080 in the domain

19 views
Skip to first unread message

namtax

unread,
Dec 6, 2011, 7:19:19 AM12/6/11
to Railo
Hi

Having an issue trying to get tomcat to rendering the pages on my site
correctly.

I have my site set up using this guide http://www.brianbruijn.com/?q=node/12

So i have a file called music-explained.com in /etc/apache2/sites-
available containing relevant info, and have also added the following
data to /opt/railo/tomcat/conf/server.xml

<Host name="music-explained.com" appBase="webapps"
unpackWARs="true" autoDeploy="true" xmlValidation="false"
xmlNamespaceAware="false">
<Context path="" docBase="/var/www/music-explained" />
<Alias>www.music-explained.com</Alias>
</Host>

My site displays fine on the homepage http://www.music-explained.com/,
but displays an error if I try to navigate to any of the internal
pages ....eg. http://www.music-explained.com/music-explained/index.cfm/artist/Michael-Jackson.

However, if I add 8080 to the domain in the internal pages, the
content displays, -eg http://www.music-explained.com:8080/music-explained/index.cfm/artist/Michael-Jackson

Wondered where I was going wrong with my config.

Thanks

Todd Rafferty

unread,
Dec 6, 2011, 8:48:16 AM12/6/11
to ra...@googlegroups.com
namtax, your docBase in the server.xml path needs to match the same directory path as your apache config.

So, if all your files are located at
/var/www/music-explained/

Then that should be reflected in both apache / tomcat.

All of your files can live together in one single directory. If they're not, then, go make them live in one single directory. There's nothing wrong with letting them mingle.
--
~Todd Rafferty
Volunteer
Community Manager
Railo Server - Open Source
----

namtax

unread,
Dec 6, 2011, 9:06:06 AM12/6/11
to Railo
Hi.

Am a bit confused. Which is the apache config? Is that the file
located at /etc/apache2/apache2.conf

Thanks

On Dec 6, 1:48 pm, Todd Rafferty <t...@getrailo.org> wrote:
> namtax, your docBase in the server.xml path needs to match the same
> directory path as your apache config.
>
> So, if all your files are located at
> /var/www/music-explained/
>
> Then that should be reflected in both apache / tomcat.
>
> All of your files can live together in one single directory. If they're
> not, then, go make them live in one single directory. There's nothing wrong
> with letting them mingle.
>
>
>
>
>
>
>
>
>
> On Tue, Dec 6, 2011 at 7:19 AM, namtax <nam...@googlemail.com> wrote:
> > Hi
>
> > Having an issue trying to get tomcat to rendering the pages on my site
> > correctly.
>
> > I have my site set up using this guide
> >http://www.brianbruijn.com/?q=node/12
>
> > So i have a file called music-explained.com in /etc/apache2/sites-
> > available containing relevant info, and have also added the following
> > data to /opt/railo/tomcat/conf/server.xml
>
> >     <Host name="music-explained.com" appBase="webapps"
> >           unpackWARs="true" autoDeploy="true" xmlValidation="false"
> > xmlNamespaceAware="false">
> >          <Context path="" docBase="/var/www/music-explained" />
> >          <Alias>www.music-explained.com</Alias>
> >     </Host>
>

> > My site displays fine on the homepagehttp://www.music-explained.com/,


> > but displays an error if I try to navigate to any of the internal
> > pages ....eg.

> >http://www.music-explained.com/music-explained/index.cfm/artist/Micha...


> > .
>
> > However, if I add 8080 to the domain in the internal pages, the
> > content displays, -eg

> >http://www.music-explained.com:8080/music-explained/index.cfm/artist/...


>
> > Wondered where I was going wrong with my config.
>
> > Thanks
>
> --

> ~Todd Rafferty*
> Volunteer** *Community Manager

Todd Rafferty

unread,
Dec 6, 2011, 9:10:37 AM12/6/11
to ra...@googlegroups.com
Please post your apache vhost config for music-explained. You've already shown us the server.xml part.
--
~Todd Rafferty
Volunteer
Community Manager

namtax

unread,
Dec 6, 2011, 9:19:27 AM12/6/11
to Railo
This maybe where im going wrong. I dont think I have an apache vhost
config for music-explained. How would I set one up?

Thanks

namtax

unread,
Dec 6, 2011, 9:25:22 AM12/6/11
to Railo
Actually, sorry..if you meant the file under /etc/apache2/sites-
available

This is the content.

<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName music-explained.com
ServerAlias *.music-explained.com
DocumentRoot /var/www/music-explained
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/music-explained> s
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
JkMount /*.cfm default
</VirtualHost>

Todd Rafferty

unread,
Dec 6, 2011, 9:25:34 AM12/6/11
to ra...@googlegroups.com
Ok, I'm guessing you're using some kind of panel to manage your website?


On Tue, Dec 6, 2011 at 9:19 AM, namtax <nam...@googlemail.com> wrote:
This maybe where im going wrong. I dont think I have an apache vhost
config for music-explained. How would I set one up?

Thanks


--
~Todd Rafferty
Volunteer
Community Manager

Todd Rafferty

unread,
Dec 6, 2011, 9:31:08 AM12/6/11
to ra...@googlegroups.com

Ok, I'm backwards... your site is setup correctly, but apache httpd doesn't know what to do with index.cfm/something/something

It sounds like you setup apache tomcat to handle user friendly rewriting, but you didn't tell apache httpd what to do with it.

Do you know if you're using mod_ajp or mod_jk?

How are you forwarding from apache httpd to apache tomcat?
--
~Todd Rafferty
Volunteer
Community Manager

namtax

unread,
Dec 6, 2011, 9:43:01 AM12/6/11
to Railo
Im using mod_jk. I just followed the end bit of this tutorial..

http://jamesconstable.co.uk/web-development/installing-railo-3-on-tomcat-6-via-apache-2-on-ubuntu-804/

To be fair, i dont really understand all this stuff. All new to me.

Thanks

Todd Rafferty

unread,
Dec 6, 2011, 9:52:35 AM12/6/11
to ra...@googlegroups.com

I believe you need to do this:

JkMount /*.cfm/* default

However, you should probably wait for Jordan to step in and confirm as I don't use mod_jk, so I'm not familiar with it.

On Tue, Dec 6, 2011 at 9:43 AM, namtax <nam...@googlemail.com> wrote:
Im using mod_jk. I just followed the end bit of this tutorial..

http://jamesconstable.co.uk/web-development/installing-railo-3-on-tomcat-6-via-apache-2-on-ubuntu-804/

To be fair, i dont really understand all this stuff. All new to me.

Thanks

--
~Todd Rafferty
Volunteer
Community Manager

Todd Rafferty

unread,
Dec 6, 2011, 9:53:02 AM12/6/11
to ra...@googlegroups.com
Sorry, what I mean is... IN ADDITION to using JkMount /*.cfm, you should also add what I suggested.

namtax

unread,
Dec 6, 2011, 10:06:14 AM12/6/11
to Railo
Really appreciate your help.

I think I have solved the issue.

I just removed the jkMount setup and it seems to be working now.

I removed the line JkMount /*.cfm default from my sites apache vhost
config, then i removed the contents from the /etc/apache2/
workers.properties file/

Now its working.

On Dec 6, 2:52 pm, Todd Rafferty <t...@getrailo.org> wrote:
> I believe you need to do this:
>
> JkMount /*.cfm/* default
>
> However, you should probably wait for Jordan to step in and confirm as I
> don't use mod_jk, so I'm not familiar with it.
>
> On Tue, Dec 6, 2011 at 9:43 AM, namtax <nam...@googlemail.com> wrote:
> > Im using mod_jk. I just followed the end bit of this tutorial..
>

> >http://jamesconstable.co.uk/web-development/installing-railo-3-on-tom...


>
> > To be fair, i dont really understand all this stuff. All new to me.
>
> > Thanks
>
> > --
>

> ~Todd Rafferty*
> Volunteer** *Community Manager

Robert Zehnder

unread,
Dec 6, 2011, 10:07:45 AM12/6/11
to ra...@googlegroups.com
My mod_jk block to handle SES urls (highlighted in red)

<IfModule mod_jk.c>
    JkMount /*.cfm ajp13
    JkMount /*.cfc ajp13
    JkMount /*.do ajp13
    JkMount /*.jsp ajp13
    JkMount /*.cfchart ajp13
    JkMount /*.cfm/* ajp13
    JkMount /*.cfml/* ajp13
    # Flex Gateway Mappings
    # JkMount /flex2gateway/* ajp13
    # JkMount /flashservices/gateway/* ajp13
    # JkMount /messagebroker/* ajp13
    JkMountCopy all
    JkLogFile /var/log/apache2/mod_jk.log
</IfModule>
--
Robert Zehnder

namtax

unread,
Dec 6, 2011, 10:12:44 AM12/6/11
to Railo
Cheers.

What is the benefit of using this mod_jk? As I seem to have got it
working without it.

On Dec 6, 3:07 pm, Robert Zehnder <rob...@getrailo.org> wrote:
> My mod_jk block to handle SES urls (highlighted in red)
>
> <IfModule mod_jk.c>
>     JkMount /*.cfm ajp13
>     JkMount /*.cfc ajp13
>     JkMount /*.do ajp13
>     JkMount /*.jsp ajp13
>     JkMount /*.cfchart ajp13
>     JkMount /*.cfm/* ajp13
>     JkMount /*.cfml/* ajp13
>     # Flex Gateway Mappings
>     # JkMount /flex2gateway/* ajp13
>     # JkMount /flashservices/gateway/* ajp13
>     # JkMount /messagebroker/* ajp13
>     JkMountCopy all
>     JkLogFile /var/log/apache2/mod_jk.log
> </IfModule>
>
>
>
>
>
>
>
>
>
> On Tue, Dec 6, 2011 at 9:53 AM, Todd Rafferty <t...@getrailo.org> wrote:
> > Sorry, what I mean is... IN ADDITION to using JkMount /*.cfm, you should
> > also add what I suggested.
>

> > On Tue, Dec 6, 2011 at 9:52 AM, Todd Rafferty <t...@getrailo.org> wrote:
>
> >> I believe you need to do this:
>
> >> JkMount /*.cfm/* default
>
> >> However, you should probably wait for Jordan to step in and confirm as I
> >> don't use mod_jk, so I'm not familiar with it.
>
> >> On Tue, Dec 6, 2011 at 9:43 AM, namtax <nam...@googlemail.com> wrote:
>
> >>> Im using mod_jk. I just followed the end bit of this tutorial..
>

> >>>http://jamesconstable.co.uk/web-development/installing-railo-3-on-tom...


>
> >>> To be fair, i dont really understand all this stuff. All new to me.
>
> >>> Thanks
>
> >>> --

> >> ~Todd Rafferty*
> >> Volunteer** *Community Manager


>
> >> Railo Server - Open Source
> >> ----
> >> Get Railo:http://getrailo.org/
> >> Write Documentation:http://wiki.getrailo.org/
> >> Report Bugs:https://issues.jboss.org/browse/RAILO
> >> Request Features:https://railo.uservoice.com/
>
> > --

> > ~Todd Rafferty*
> > Volunteer** *Community Manager

Todd Rafferty

unread,
Dec 6, 2011, 10:29:07 AM12/6/11
to ra...@googlegroups.com
Sounds like you have mod_ajp running too because there's no way it should still be working when you remove mod_jk as well.

Do you have anything regarding ProxyPass in your httpd.conf?
--
~Todd Rafferty

Hauke Hagedorn | Hagedorn Internet- & Veranstaltungsdiensteistungen

unread,
Dec 6, 2011, 10:45:08 AM12/6/11
to ra...@googlegroups.com
Hi,

as you have used that tutorial mentioned in your first post, and then added some steps from the other one, you most likely had two versions of that workers.properties file.
One resides in /etc/apache2 and the other one in /opt/railo/tomcat, but only that one in the railo-install-dir is being used. Actually today i ran into a similar issue and found out, that only

 JkMount /*.cfm default
 JkMount /*.cfml default
 JkMount /*.cfc default
 JkMount /*.cfm* default
 JkMount /*.cfml* default

is missing in apache's virtual host file - and therefore in the tutorial itself.

AFAIK, the viviotech-installer installs mod_jk along with the other stuff needed. If you need it, I can eMail you my working vHost file. But
setting it up is fairly simple. Just take the template from Brian's tutorial, make your adjustments and finally add the JkMount-Stuff right before
the closing </VirtualHost> - that should make SES-URLs work as well.


HtH,
Hauke 

--

Hagedorn Internet- & Veranstaltungsdienstleistungen
Wenderter Str. 37d
31157 Sarstedt

Finanzamt Hildesheim
Steuernummer: 30 116 03687

Tel +49 5066 917339-1
Fax +49 5066 917339-9

webwww.mediaciety.de
mailin...@mediaciety.de

namtax

unread,
Dec 6, 2011, 11:37:11 AM12/6/11
to Railo
My httpd.conf file is


JkWorkersFile workers.properties
DirectoryIndex index.html index.htm index.cfm index.cfml

namtax

unread,
Dec 6, 2011, 11:41:06 AM12/6/11
to Railo
Hi.

It seems to be functioning ok at the moment, so dont think I will use
mod_jk. All this is going over my head at the moment, but I seem to be
getting it working.

Thanks

On Dec 6, 3:45 pm, Hauke Hagedorn | Hagedorn Internet- &

> >     <mailto:rob...@getrailo.org>> wrote:
> >     > My mod_jk block to handle SES urls (highlighted in red)
>
> >     > <IfModule mod_jk.c>
> >     >     JkMount /*.cfm ajp13
> >     >     JkMount /*.cfc ajp13
> >     >     JkMount /*.do ajp13
> >     >     JkMount /*.jsp ajp13
> >     >     JkMount /*.cfchart ajp13
> >     >     JkMount /*.cfm/* ajp13
> >     >     JkMount /*.cfml/* ajp13
> >     >     # Flex Gateway Mappings
> >     >     # JkMount /flex2gateway/* ajp13
> >     >     # JkMount /flashservices/gateway/* ajp13
> >     >     # JkMount /messagebroker/* ajp13
> >     >     JkMountCopy all
> >     >     JkLogFile /var/log/apache2/mod_jk.log
> >     > </IfModule>
>
> >     > On Tue, Dec 6, 2011 at 9:53 AM, Todd Rafferty <t...@getrailo.org

> >     <mailto:t...@getrailo.org>> wrote:
> >     > > Sorry, what I mean is... IN ADDITION to using JkMount /*.cfm,
> >     you should
> >     > > also add what I suggested.
>
> >     > > On Tue, Dec 6, 2011 at 9:52 AM, Todd Rafferty

> >     <t...@getrailo.org <mailto:t...@getrailo.org>> wrote:
>
> >     > >> I believe you need to do this:
>
> >     > >> JkMount /*.cfm/* default
>
> >     > >> However, you should probably wait for Jordan to step in and
> >     confirm as I
> >     > >> don't use mod_jk, so I'm not familiar with it.
>
> >     > >> On Tue, Dec 6, 2011 at 9:43 AM, namtax <nam...@googlemail.com

> > ~Todd Rafferty/
> > Volunteer///Community Manager


> > Railo Server - Open Source
> > ----
> > Get Railo:http://getrailo.org/
> > Write Documentation:http://wiki.getrailo.org/
> > Report Bugs:https://issues.jboss.org/browse/RAILO
> > Request Features:https://railo.uservoice.com/
>
> --
>

> *Hagedorn Internet- & Veranstaltungsdienstleistungen*


> Wenderter Str. 37d
> 31157 Sarstedt
>
> Finanzamt Hildesheim
> Steuernummer: 30 116 03687
>
> Tel +49 5066 917339-1
> Fax +49 5066 917339-9
>

> webwww.mediaciety.de<http://www.mediaciety.de>
> maili...@mediaciety.de

Reply all
Reply to author
Forward
0 new messages