Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
gordon daniels
ajp1.3 config
4. März 2013 15:20
Antwort

gordon daniels

Rang: Liferay Master

Nachrichten: 670

Eintrittsdatum: 23. August 2008

Neue Beiträge

Could someone tell me if this config for port redirect is proper? I am having 503 errors after server runs for a while. Also, I commented out port 8080 in server.xml file. Is that proper?

thanks

<VirtualHost *:80>
ServerAdmin webmaster@example.com
ServerName example.com
ServerAlias www.example.com
Rewriteengine On
ErrorLog "/var/log/httpd/ajp.error_log"
CustomLog "/var/log/httpd/ajp.access_log" common
<Directory />
Options FollowSymlinks
AllowOverride None
</Directory>

ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/
</VirtualHost>
gordon daniels
RE: ajp1.3 config
4. März 2013 20:56
Antwort

gordon daniels

Rang: Liferay Master

Nachrichten: 670

Eintrittsdatum: 23. August 2008

Neue Beiträge

bump: My server shutdowns after being up for about eight hours. I see this in the apache log:

(70007)The timeout specified has expired: ajp_ilink_receive() can't receive header

So, I was hoping someone could tell me if the above config is wrong.
Linus Sphinx
RE: ajp1.3 config
11. März 2013 11:19
Antwort

Linus Sphinx

Rang: Junior Member

Nachrichten: 84

Eintrittsdatum: 12. August 2010

Neue Beiträge

Pretty sure that's wrong, don't see a need for the reverse for one and you probably only see proxy of unsecured requests on port 80 for another. I'd take it off the virtualhost and put in it's own scrap in /etc/httpd/conf.d/ like;
1echo "# ajp proxy configuration
2LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
3ProxyPass / ajp://localhost:8009/
4" > /etc/httpd/conf.d/proxy_ajp.conf

and proxy everything.
gordon daniels
RE: ajp1.3 config
11. März 2013 20:04
Antwort

gordon daniels

Rang: Liferay Master

Nachrichten: 670

Eintrittsdatum: 23. August 2008

Neue Beiträge

Linus: thanks for the reply. Yes, that does not work. I installed mod_jk and configured it. It works great.

thanks again for taking the time to help
Jack Chung
RE: ajp1.3 config
12. März 2013 08:52
Antwort

Jack Chung

Rang: New Member

Nachrichten: 19

Eintrittsdatum: 30. November 2011

Neue Beiträge

This was a while ago, and it looks like there was a workaround with mod_jk, but just in response, I had configured mod_proxy_ajp as below, with the actual server hostnames replaced by example.com:

<VirtualHost *:80>
ServerName example.com
<Proxy *>
Allow from all
</Proxy>
ProxyPass / ajp://example.com:8009/
</VirtualHost>

Also, commenting out 8080 in the Tomcat server.xml shouldn't be an issue, although I've never done it. I've found accessing the Tomcat server directly can be helpful for troubleshooting.
gordon daniels
RE: ajp1.3 config
12. März 2013 09:05
Antwort

gordon daniels

Rang: Liferay Master

Nachrichten: 670

Eintrittsdatum: 23. August 2008

Neue Beiträge

Jack: thanks. I had just read recently that approach might work. I really appreciate you sharing. I'm going to give it a try. BTW, mod_jk works really well but not as easy to configure I think as ajp.
Jack Chung
RE: ajp1.3 config
14. März 2013 16:59
Antwort

Jack Chung

Rang: New Member

Nachrichten: 19

Eintrittsdatum: 30. November 2011

Neue Beiträge

Generally, the preferred method, or so I'm told, is to use mod_jk. Sometimes, there is the additional configuration, or even a compilation of the module itself on *nix systems, but for the most part, mod_jk has more flexibility than mod_proxy_ajp. You may want to experiment with the jkstatus and jkmanager page on some sandbox systems. It allows realtime manipulation of the ajp workers.
gordon daniels
RE: ajp1.3 config
16. März 2013 21:16
Antwort

gordon daniels

Rang: Liferay Master

Nachrichten: 670

Eintrittsdatum: 23. August 2008

Neue Beiträge

Jack: thanks for the input. Will give it a try. Really appreciate you taking the time.