Access Alfresco by Domain Name

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2007 11:38 PM
I have been scouring these forums for a good answer to this. Seems others have that same question, but I have yet to find a decent solution.
I would like to access my Alfresco from a web browser by typing http://www.myalfrescosite.com, instead of typing http://www.myalfrescosite.com:8080/alfresco.
Can someone provide insight as to how this can be accomplished?
Thanks!
-Matt
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2007 03:40 AM
1) In most cases Apache already has mod proxy installed.
in this case add something like this to httpd.conf file (or domain files if you are using more advanced config):
ProxyPass /alfresco http://127.0.0.1:8080/alfrescoProxyPassReverse /alfresco http://127.0.0.1:8080/alfresco
2) Then you may want make root app to redirect to your /alfresco subfolder if user just enters IP address. Edit tomcat\webapps\ROOT\index.jsp to have this lines only:
<?xml version="1.0" encoding="ISO-8859-1"?><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head><meta http-equiv="refresh" content="0;url=/alfresco"></head></html>
Then you need to disable pre-compiled page in web.xml in ROOT\WEB-INF.Comment out these lines:
<servlet> <servlet-name>org.apache.jsp.index_jsp</servlet-name> <servlet-class>org.apache.jsp.index_jsp</servlet-class> </servlet> <servlet-mapping> <servlet-name>org.apache.jsp.index_jsp</servlet-name> <url-pattern>/index.jsp</url-pattern> </servlet-mapping>
Hope this helps - it worked for me.Alternative for 1), if you run on windows or as root is to change tomcat to run on port 80 in server.xml (just search for 8080 and change it.)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2007 06:38 AM
I have been trying that proxy approach through httpd. I am running apache 2.0.54 and Alfresco 1.4 with tomcat.
I placed those proxy lines, similar to the ones you mention, in my httpd.conf as shown below. However, when I web to the ServerName http://www.mydomain.com/alfresco, I get an error message stating:
Forbidden, "You don't have permission to access /alfresco on this erver."
Any ideas why this is happening?
Thanks!
-Matt
— snip of httpd.conf —
<virtualhost 10.0.0.2:80>
ServerName http://www.mydomain.com
DocumentRoot /opt/alfresco/tomcat/webapps/ROOT
ProxyRequests off
ProxyPass /alfresco http://10.0.0.2:8080/alfresco
ProxyPassReverse /alfresco http://10.0.0.2:8080/alfresco
ProxyPreserveHost On
</virtualhost>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2007 07:11 AM
BTW, part 2) of what I wrote above was used on windows when changing Tomcat port to 80. In case of proxy simple HTML file, placed in document root, should be enough.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2007 07:29 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2007 11:46 AM
Now, as for step 2, there is a lot os "stuff" in the index.jsp file you mention. I see things like font information, header information, etc.
Are you saying that in your proposed step 2, the ONLY lines in this index.jsp can be the ones you mention? What about all of that other info in this file? Is it needed?
Thanks!
-Matt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2007 01:16 PM
As I mentioned before, in case of proxy you will not require changing index.jsp, as your root application is not proxied (only /alfresco).
It means, if user accesses your server by domain name, it can be served simple index.html file with only lines I mentioned (meta refresh). It should probably be placed in DocumentRoot location (does not need to be anywhere in tomcat - make sure Apache has a right to access it)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2007 01:29 PM
<?xml version="1.0" encoding="ISO-8859-1"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="refresh" content="0;url=/alfresco">
</head>
</html>
These aren't the lines that belong in the index.html file you mention…are they? Can you reiterate the lines that belong in this index.html file I will create?
Thanks!
-Matt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2007 02:14 PM
File can contain just single line:
<meta http-equiv="refresh" content="0;url=/alfresco">
It will instruct browser immediately request "/alfresco" from the server.
Other lines just for HTML standard compliance (meta should be in head element)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2007 03:03 PM
http://tomcat.apache.org/download-connectors.cgi
(Use mod_jk and NOT mod_jk2).
