Configure Crowd behind Apache
Asked by Julien Silverston:

Hi,

I've setup crowd behind apache to avoid to use 8095 port, ...

Works great but using [crowd.acme.com](http://crowd.acme.com) I go to crowd setup page instead of crowd.acme.com/crowd

My Apache config :  
\<VirtualHost \*:80\>  
ServerAdmin webmaster@localhost  
ServerName crowd.acme.com  
\<Proxy \*\>  
Order deny,allow  
Allow from all  
\</Proxy\>  
ProxyRequests Off  
ProxyPreserveHost On  
ProxyPass / [http://crowd.acme.com:8095/](http://crowd.tenflares.com:8095/ "Follow link")  
ProxyPassReverse / [http://crowd.acme.com:8095/](http://crowd.tenflares.com:8095/ "Follow link")  
ErrorLog $

{APACHE_LOG_DIR}/error.log  
LogLevel warn  
CustomLog ${APACHE_LOG_DIR}/access.log combined

\</VirtualHost\>

I didn't tune crowd server.xml.

How to manage that ?

Thank you


Answers:
author: Julien Silverston
body: No didn't work, got some Tomcat errors.

Finaly

I changed crowd HOME : /atlassian-crowd/apache-tomcat/webapps/ROOT/index.html

To add :

\<script language="javascript"\>  
window.location.href = "http://crowd.acme.com/crowd"  
\</script\>

comments: author: Greg Redl
body: I had a similar issue and found this to be the only thing that worked.To be clear, you need to add that html code inside the \<head\>, and you can leave everything else as is\<head\> \<title\>Atlassian Crowd - Identity management for web apps\</title\> \<link rel="shortcut icon" href="images/favicon.ico"\> \<link rel="stylesheet" href="crowd/console/setup/aui/aui/css/aui.css"\> \<script language="javascript"\> window.location.href = "http://\<DNSname\>/crowd"; \</script\> \<script src="crowd/console/setup/aui/aui/js/aui-all.js"\>\</script\> \<style\> .aui-header .aui-header-logo-atlassian .aui-header-logo-device { background-image: url("images/atlassian_logo_text_white_x2.png"); width: 112px; } \</style\>\</head\>


author: Kabeer Nasir
body: If the context path is crowd and you want to set up with https then you do it this way:

```
# Not sure if the backend needs these http headers set, but I do it, just in caseRequestHeader set X-Forwarded-Proto "https"RequestHeader set X-Forwarded-Port "443"#.......Redirect / /crowd&lt;Proxy *&gt;    Order deny,allow    Allow from all&lt;/Proxy&gt;ProxyPass /crowd http://localhost:8095/crowd connectiontimeout=300 timeout=300ProxyPassReverse /crowd/ http://localhost.com:8095/crowd/
```

Hope this helps for anyone struggling with both http and https


author: chandragaajula
body: Follow up to comment by Mircea above:

I used the values:

```
ProxyPass / http://localhost:8095/crowd/ProxyPassReverse / http://localhost:8095/crowd/
```

Here's the error I get with that option:

crowd_error.JPG  
[](https://community.atlassian.com/t5/Crowd-questions/Configure-Crowd-behind-Apache/qaq-p/72294?attachment-id=3616){#link_115b146cb152df}  
[](/tnckb94959/attachments/tnckb94959/crowd-questions/4355/1/crowd_error.JPG){#display_115b146cb152df_0}


author: CelsoA
body: Hi Julien,

I usually use this vhost pattern:

```
<VirtualHost *:80>    #Creating virtual host    ServerAdmin admin@domain.com    ServerName crowd.example.com    ServerAlias crowd.example.com    ProxyRequests Off    ProxyPreserveHost On    <Proxy *>        Order deny,allow        Allow from all    </Proxy>    ProxyPass / http://localhost:8095/crowd    ProxyPassReverse / http://localhost:8095/crowd  ?
```

```
<Location />        Order allow,deny        Allow from all    </Location>    ErrorLog /path/to/example.com-error.log    LogLevel debug    CustomLog /path/to/example.com-access.log combined</VirtualHost>
```

```
?
```

```
I use this like a individual vhost to have more detailed logs if I need.
```

```
Please give it a try and let me know how it goes.
```

```
?
```

```
Regards,
```

```
Celso Yoshioka
```

comments: author: Mircea Marin
body: Hi Ceslo,

I have the same issue and I tried your solution. What I got is this:

```
HTTP Status 404 - /crowdcrowd/type Status reportmessage /crowdcrowd/description The requested resource is not available.
```

If I remove /crowd from the VirtualHost then it works except that I get to the setup page.

Any other ideas?


author: Nicolas Grussenmeyer
body: Hi guys,

Any chance that somebody found a solution for this one? I have the exact same issue, redirected to /crowdcrowd/ with a 404

Thanks


author: Julien Silverston
body: Hello Tiago,

I can do that but I block :8095 access to use only the reverseproxy.

I want to use :80 for all Atlassian Tools instead to let open all the port.

Maybe I can use instead :  
`ProxyPass / `[http://localhost:8095/crowd</code<>>](http://localhost:8095/crowd%3C/code)
[](http://localhost:8095/crowd%3C/code)  
[`ProxyPassReverse / `](http://localhost:8095/crowd%3C/code)<http://localhost:8095/crowd>


author: Tiago Comasseto
body: Hi Julien,

What happens if you set apache like this?

```
ProxyPass / http://crowd.acme.com:8095/crowdProxyPassReverse / http://crowd.acme.com:8095/crowd
```

Chees


Tags: apache

crowd-administration

reverse-proxy