我有两个应用程序,一个是在php工作,另一个是在jetty服务器上工作。我想配置到Apache,所以我在httpd conf文件中编写代码 所以我写了这段代码,但它没有正常工作
<VirtualHost *:80>
ServerAdmin example.com
DocumentRoot /var/www/html/example.com
ServerName example.com
ErrorLog logs/dev.mapmyindia.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
ProxyRequests off
ProxyPreserveHost on
ProxyPass /directionapp/ http://localhost:8989/index.html/
ProxyPassReverse /directionapp/ http://localhost:8989/index.html/
<Directory /var/www/html/example.com>
Options FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>
<Directory /var/www/html/example.com/rim/>
Options FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
# Allow from 122.160.188.70 122.180.97.58
Allow from all
#Allow from 122.160.188.70
</Directory>
</VirtualHost>
答案 0 :(得分:0)
请查看此文档https://www.playframework.com/documentation/2.3.x/HTTPServer
LoadModule proxy_module modules/mod_proxy.so
...
ProxyPreserveHost On
ServerName www.stackoverflow.com
ProxyPass / excluded!
ProxyPass / http://127.0.0.1:9000/
ProxyPassReverse / http://127.0.0.1:9000/
答案 1 :(得分:0)
您必须使用mod_proxy
对Jetty
执行此操作。 Here是干净的配置详细信息。
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_balancer_module /usr/lib/apache2/modules/mod_proxy_balancer.so
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
LoadModule proxy_ajp_module /usr/lib/apache2/modules/mod_proxy_ajp.so
LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so